mirror of https://github.com/yandex/odyssey.git
odissey: add copy support for transaction pooling
This commit is contained in:
parent
2d40129eb8
commit
fde44a5de4
|
@ -17,6 +17,7 @@ set(od_src
|
||||||
od_router.c
|
od_router.c
|
||||||
od_router_session.c
|
od_router_session.c
|
||||||
od_router_transaction.c
|
od_router_transaction.c
|
||||||
|
od_router_copy.c
|
||||||
od_cancel.c
|
od_cancel.c
|
||||||
od_auth.c
|
od_auth.c
|
||||||
od_periodic.c
|
od_periodic.c
|
||||||
|
|
|
@ -135,11 +135,13 @@ od_router_session(od_client_t *client)
|
||||||
copy_rc = od_router_copy_in(client);
|
copy_rc = od_router_copy_in(client);
|
||||||
if (copy_rc != OD_RS_OK)
|
if (copy_rc != OD_RS_OK)
|
||||||
return copy_rc;
|
return copy_rc;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
/* CopyOutResponse */
|
/* CopyOutResponse */
|
||||||
if (type == 'H') {
|
if (type == 'H') {
|
||||||
assert(! server->is_copy);
|
assert(! server->is_copy);
|
||||||
server->is_copy = 1;
|
server->is_copy = 1;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
/* copy out complete */
|
/* copy out complete */
|
||||||
if (type == 'c') {
|
if (type == 'c') {
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "od_router.h"
|
#include "od_router.h"
|
||||||
#include "od_router_session.h"
|
#include "od_router_session.h"
|
||||||
#include "od_router_transaction.h"
|
#include "od_router_transaction.h"
|
||||||
|
#include "od_router_copy.h"
|
||||||
#include "od_cancel.h"
|
#include "od_cancel.h"
|
||||||
#include "od_fe.h"
|
#include "od_fe.h"
|
||||||
#include "od_be.h"
|
#include "od_be.h"
|
||||||
|
@ -138,6 +139,25 @@ od_router_transaction(od_client_t *client)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* CopyInResponse */
|
||||||
|
if (type == 'G') {
|
||||||
|
od_routerstatus_t copy_rc;
|
||||||
|
copy_rc = od_router_copy_in(client);
|
||||||
|
if (copy_rc != OD_RS_OK)
|
||||||
|
return copy_rc;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* CopyOutResponse */
|
||||||
|
if (type == 'H') {
|
||||||
|
assert(! server->is_copy);
|
||||||
|
server->is_copy = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* copy out complete */
|
||||||
|
if (type == 'c') {
|
||||||
|
server->is_copy = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return OD_RS_OK;
|
return OD_RS_OK;
|
||||||
|
|
Loading…
Reference in New Issue