Changeset: 9cde2d6c052e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9cde2d6c052e
Modified Files:
        monetdb5/modules/mal/clients.c
Branch: Dec2023
Log Message:

Only set query timeout for query setting the timeout if not testing.


diffs (21 lines):

diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -479,9 +479,14 @@ CLTqueryTimeout(Client cntxt, MalBlkPtr 
                lng timeout_micro = ATOMIC_GET(&GDKdebug) & FORCEMITOMASK
                                && qto == 1 ? 1000 : (lng) qto * 1000000;
                mal_clients[idx].qryctx.querytimeout = timeout_micro;
-               QryCtx *qry_ctx = MT_thread_get_qry_ctx();
-               if (qry_ctx)
-                       qry_ctx->querytimeout = timeout_micro;
+               if (timeout_micro != 1000) {
+                       /* only set timeout for current query if not setting it 
to 1
+                        * msec during testing: we don't want a timeout during 
this
+                        * query */
+                       QryCtx *qry_ctx = MT_thread_get_qry_ctx();
+                       if (qry_ctx)
+                               qry_ctx->querytimeout = timeout_micro;
+               }
        }
        MT_lock_unset(&mal_contextLock);
        return msg;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to