mirror of https://github.com/yandex/odyssey.git
odissey: set proper client transition in transaction pooling
This commit is contained in:
parent
88de4ac4e3
commit
ed1ddd01de
|
@ -64,7 +64,7 @@ od_router_transaction(od_client_t *client)
|
||||||
route->scheme->client_max);
|
route->scheme->client_max);
|
||||||
return OD_RS_ELIMIT;
|
return OD_RS_ELIMIT;
|
||||||
}
|
}
|
||||||
od_clientpool_set(&route->client_pool, client, OD_CQUEUE);
|
od_clientpool_set(&route->client_pool, client, OD_CPENDING);
|
||||||
client->route = route;
|
client->route = route;
|
||||||
|
|
||||||
od_debug(&pooler->od->log, client->io, "C: route to %s server",
|
od_debug(&pooler->od->log, client->io, "C: route to %s server",
|
||||||
|
@ -134,6 +134,8 @@ od_router_transaction(od_client_t *client)
|
||||||
|
|
||||||
if (type == 'Z') {
|
if (type == 'Z') {
|
||||||
if (! server->is_transaction) {
|
if (! server->is_transaction) {
|
||||||
|
od_clientpool_set(&route->client_pool, client,
|
||||||
|
OD_CPENDING);
|
||||||
client->server = NULL;
|
client->server = NULL;
|
||||||
od_berelease(server);
|
od_berelease(server);
|
||||||
server = NULL;
|
server = NULL;
|
||||||
|
|
Loading…
Reference in New Issue