Changeset: 8a0f93f6bfe1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8a0f93f6bfe1
Modified Files:
        gdk/gdk_join.c
Branch: Jan2022
Log Message:

Use unique names for temporary hash for join.
It clashed with the name for the temporary hash for unique, however,
the chance that they would clash is exactly 0 (the thread id is part
of the name, and a thread can't do two things at the same time).


diffs (14 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3173,8 +3173,8 @@ count_unique(BAT *b, BAT *s, BUN *cnt1, 
                        mask = (BUN) 1 << 16;
                if ((hs.heaplink.farmid = BBPselectfarm(TRANSIENT, b->ttype, 
hashheap)) < 0 ||
                    (hs.heapbckt.farmid = BBPselectfarm(TRANSIENT, b->ttype, 
hashheap)) < 0 ||
-                   snprintf(hs.heaplink.filename, 
sizeof(hs.heaplink.filename), "%s.thshunil%x", nme, (unsigned) THRgettid()) >= 
(int) sizeof(hs.heaplink.filename) ||
-                   snprintf(hs.heapbckt.filename, 
sizeof(hs.heapbckt.filename), "%s.thshunib%x", nme, (unsigned) THRgettid()) >= 
(int) sizeof(hs.heapbckt.filename) ||
+                   snprintf(hs.heaplink.filename, 
sizeof(hs.heaplink.filename), "%s.thshjnl%x", nme, (unsigned) THRgettid()) >= 
(int) sizeof(hs.heaplink.filename) ||
+                   snprintf(hs.heapbckt.filename, 
sizeof(hs.heapbckt.filename), "%s.thshjnb%x", nme, (unsigned) THRgettid()) >= 
(int) sizeof(hs.heapbckt.filename) ||
                    HASHnew(&hs, b->ttype, BUNlast(b), mask, BUN_NONE, false) 
!= GDK_SUCCEED) {
                        GDKerror("cannot allocate hash table\n");
                        HEAPfree(&hs.heaplink, true);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to