Changeset: 38ed475b5611 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/38ed475b5611
Modified Files:
        monetdb5/ChangeLog.Jul2021
        monetdb5/optimizer/opt_support.c
Branch: Jul2021
Log Message:

(Re)set starttime when starting to optimize a MAL plan.
Otherwise any MAL instructions that might get executed use the start
timm of the previous query to determine whether there is a query
timeout.


diffs (27 lines):

diff --git a/monetdb5/ChangeLog.Jul2021 b/monetdb5/ChangeLog.Jul2021
--- a/monetdb5/ChangeLog.Jul2021
+++ b/monetdb5/ChangeLog.Jul2021
@@ -1,3 +1,7 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Wed Oct 19 2022 Sjoerd Mullender <sjo...@acm.org>
+- Fix a bug where the MAL optimizer would use the starttime of the
+  previous query to determine whether a query timeout occurred.
+
diff --git a/monetdb5/optimizer/opt_support.c b/monetdb5/optimizer/opt_support.c
--- a/monetdb5/optimizer/opt_support.c
+++ b/monetdb5/optimizer/opt_support.c
@@ -157,6 +157,7 @@ optimizeMALBlock(Client cntxt, MalBlkPtr
        }
 
        oldstop = mb->stop;
+       mb->starttime = GDKusec();
        for (pc = 0; pc < mb->stop; pc++) {
                p = getInstrPtr(mb, pc);
                if (getModuleId(p) == optimizerRef && p->fcn && p->token != 
REMsymbol) {
@@ -692,4 +693,3 @@ int isFragmentGroup(InstrPtr p){
                                getFunctionId(p)== mirrorRef
                        ));
 }
-
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to