Implementation of shared buffer level in the gwbuf so that one set of data can be kept with

different offsets for different gwbufs

Updated monitor to better handle maste/slave replication environments

Split MASTER and SERVER bits in the erver bitmask so that we canhave more states, MASTER, SLAVE and NOT IN REPLICATION

Updates to the read write splitter for routing commands to all nodes, diagnostic output and fixes to the algorithm to pick up a master and slave connection
This commit is contained in:
Mark Riddoch
2013-07-11 18:37:43 +02:00
parent aea8af08ba
commit 619af90696
9 changed files with 243 additions and 135 deletions

View File

@ -60,6 +60,9 @@ struct client_session {
typedef struct {
int n_sessions; /**< Number sessions created */
int n_queries; /**< Number of queries forwarded */
int n_master; /**< Number of statements sent to master */
int n_slave; /**< Number of statements sent to slave */
int n_all; /**< Number of statements sent to all */
} ROUTER_STATS;
@ -71,9 +74,7 @@ struct instance {
CLIENT_SESSION* connections; /**< Link list of all the client connections */
SPINLOCK lock; /**< Spinlock for the instance data */
BACKEND** servers; /**< The set of backend servers for this instance */
BACKEND* master; /**< NULL if not known, pointer otherwise */
unsigned int bitmask; /**< Bitmask to apply to server->status */
unsigned int bitvalue;/**< Required value of server->status */
BACKEND* master; /**< NULL if not known, pointer otherwise */
ROUTER_STATS stats; /**< Statistics for this router */
INSTANCE* next;
};