Changeset: 2f38d0a15641 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2f38d0a15641
Modified Files:
        gdk/gdk_join.c
Branch: Dec2025
Log Message:

We need a lock.


diffs (19 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3683,6 +3683,7 @@ joincost(BAT *r, BUN lcount, struct cand
                         * Multiply the probe cost by an I/O latency
                         * factor to encourage swapping to a sequential
                         * scan instead. */
+                       MT_lock_set(&r->theaplock);
                        if (!GDKinmemory(r->theap->farmid) &&
                            (size_t)cnt * ATOMsize(r->ttype) + (r->tvheap ? 
r->tvheap->free : 0) > GDK_mem_maxsize / 4) {
                                /* Disk random access is ~100x to 1000x
@@ -3691,6 +3692,7 @@ joincost(BAT *r, BUN lcount, struct cand
                                 * probes as highly toxic. */
                                rcost *= 100.0;
                        }
+                       MT_lock_unset(&r->theaplock);
                } else if ((parent = VIEWtparent(r)) != 0 &&
                           (b = BATdescriptor(parent)) != NULL) {
                        if (BATcheckhash(b)) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to