Changeset: a6b0334ca07d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/a6b0334ca07d Modified Files: monetdb5/mal/mal_runtime.c Branch: default Log Message:
At the moment, disable query queue changes on recursive calls. Later we have to improve this for these cases when multiple workers are around diffs (57 lines): diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c --- a/monetdb5/mal/mal_runtime.c +++ b/monetdb5/mal/mal_runtime.c @@ -196,6 +196,10 @@ runtimeProfileInit(Client cntxt, MalBlkP size_t i, paused = 0; str q; + /* Recursive calls don't change the query queue, but later we have to check + how to stop/pause/resume queries doing recursive calls from multiple workers */ + if (stk->up) + return; MT_lock_set(&mal_delayLock); if(USRstats == NULL){ @@ -218,20 +222,6 @@ runtimeProfileInit(Client cntxt, MalBlkP } } assert(qhead < qsize); - // check for recursive call, which does not change the number of workers - if (stk->up) { - i = qtail; - while (i != qhead) { - if (QRYqueue[i].mb && QRYqueue[i].stk == stk->up) { - QRYqueue[i].stk = stk; - mb->tag = stk->tag = qtag++; - MT_lock_unset(&mal_delayLock); - return; - } - if (++i >= qsize) - i = 0; - } - } i=qtail; while (i != qhead){ paused += QRYqueue[i].status && (QRYqueue[i].status[0] == 'p' || QRYqueue[i].status[0] == 'r'); /* running, prepared or paused */ @@ -287,17 +277,14 @@ runtimeProfileFinish(Client cntxt, MalBl size_t i; bool found = false; + /* Recursive calls don't change the query queue, but later we have to check + how to stop/pause/resume queries doing recursive calls from multiple workers */ + if (stk->up) + return; MT_lock_set(&mal_delayLock); i=qtail; while (i != qhead){ if (QRYqueue[i].stk == stk){ - if (stk->up){ - // recursive call - QRYqueue[i].stk = stk->up; - mb->tag = stk->tag; - MT_lock_unset(&mal_delayLock); - return; - } QRYqueue[i].status = "finished"; QRYqueue[i].finished = time(0); QRYqueue[i].workers = mb->workers; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org