[Spock Proxy Devel] building & running problems
Status: Alpha
Brought to you by:
kaotao
From: Pavel G. <pa...@gm...> - 2009-11-10 15:03:12
|
Hello, spockproxy developers! I'm very impressed with spockproxy and tried to use it. But i got some problems: 1. I can't compile spockproxy with gcc 4.4.x from unmodified sources. for solving this i did: a) delete "-Werror" from src/Makefile.am, because new gcc prints many warnings. b) modify some compilation errors (mostly errors was about missing #include <stdio.h>) c) link spockproxy by hands because make libtool prints many errors and i don't know how to fix them (i'm not very familiar with libtool): /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o spockproxy spockproxy-spockproxy.o spockproxy-network-mysqld.o spockproxy-network-mysqld-proto.o spockproxy-network-mysqld-proxy.o spockproxy-network-mysqld-server.o spockproxy-network-mysqld-table.o spockproxy-network-conn-pool.o spockproxy-network-socket.o spockproxy-sql-tokenizer.o spockproxy-glib-ext.o spockproxy-mysql_wrapper.o spockproxy-partition.o spockproxy-sql-parser.o spockproxy-perf_monitor.o spockproxy-messages.o spockproxy-resultset_merge.o -levent -lglib-2.0 -L/usr/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -L/usr/lib -lssl -lcrypto ../libtool: line 849: X--tag=CXX: command not found ../libtool: line 882: libtool: ignoring unknown tag : command not found ../libtool: line 849: X--mode=link: command not found ../libtool: line 1016: *** Warning: inferring the mode of operation is deprecated.: command not found ../libtool: line 1017: *** Future versions of Libtool will require --mode=MODE be specified.: command not found gcc: no input files gcc: no input files gcc: no input files gcc: no input files ../libtool: line 2254: X-g: command not found ../libtool: line 2254: X-O2: command not found ../libtool: line 1973: X-L/usr/lib/mysql: No such file or directory ../libtool: line 1973: X-L/usr/lib: No such file or directory ../libtool: line 2423: Xspockproxy: command not found After that i tried to run spockproxy and it started successfully! after playing with selects i tried to insert record in database. But it failed, after examining spockproxy logs i found, that get_next_id() function in meta database i missing. I wrote a simple substitute: CREATE FUNCTION `get_next_id`(table_name_ VARCHAR(100), ids_count_ INTEGER(11)) RETURNS bigint(20) NOT DETERMINISTIC SQL SECURITY DEFINER COMMENT '' begin declare id bigint; select next_id from shard_table_directory where table_name=table_name_ into id; update shard_table_directory set next_id=next_id+ids_count_ where table_name=table_name_; return id; end; But as i understand, it is not thread-safe (if some spockproxy intances work simulateniously with meta database). Some missing basic feautures/things, about i thinked: 1) After looking at logs, i see that spockproxy opens 50 connections to meta database, this too many (for shards this is ok) 2) I can't specify port for meta database So, i have following questions: 1) Do you plan to release in nearly future next version of spockproxy (may be with fixes for compilation process)? 2) get_next_id() function is not present in sample medatbase dump, so is good idea to add it, can you give me code for it? 3) Spockproxy support failover for high availability? I plan to have 2 servers for each shard with master-master replication. 4) Can i contribute code for spockproxy (patches for compilation, etc)? PS: Thanks for reading this long letter. Sorry for my english, it is not my native language :-) |