Do service client counts in the core
As all connections should be accepted via dcb_accept, it is the optimal place to calculate how many open client connections per service there are. The decrementation should be done when the session is closed instead of when the call to dcb_close for the client DCB is done. This allows the client count to be the absolute reference count that sessions have to a service. The current client count is a duplicate counter that should match the n_current value in SERVICE_STATS. The former does differ from the latter in that it does the incrementation when the client DCB is accepted instead of when the session is created.
This commit is contained in:
@ -1418,7 +1418,6 @@ static void gw_process_one_new_client(DCB *client_dcb)
|
||||
CHK_PROTOCOL(protocol);
|
||||
client_dcb->protocol = protocol;
|
||||
|
||||
atomic_add(&client_dcb->service->client_count, 1);
|
||||
//send handshake to the client_dcb
|
||||
MySQLSendHandshake(client_dcb);
|
||||
|
||||
|
Reference in New Issue
Block a user