Execution of session commands failed because session commands and normal sql statements were executed in a wrong order if backend was executing previous session command while new sql stmt was routed to that backend. There was a window where ordering went wrong.
It is possible that one normal sql stmt arrives while previous sescmds are still being executed.

Introduced a new member in backend_ref_t structure, bref_pending_cmd where new sql stmt pointer is stored in that case. When sescmds are executed completely, that command is automatically executed next.
This commit is contained in:
VilhoRaatikka
2014-09-26 15:40:32 +03:00
parent 2183dbcc28
commit 5ec1a83f3b
4 changed files with 60 additions and 2 deletions

View File

@ -224,6 +224,7 @@ typedef struct backend_ref_st {
bref_state_t bref_state;
int bref_num_result_wait;
sescmd_cursor_t bref_sescmd_cur;
GWBUF* bref_pending_cmd; /*< For stmt which can't be routed due active sescmd execution */
#if defined(SS_DEBUG)
skygw_chk_t bref_chk_tail;
#endif