Changeset: 0a407fd22c36 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0a407fd22c36
Modified Files:
gdk/gdk_batop.c
Branch: Dec2025
Log Message:
Take read lock when using hash.
diffs (18 lines):
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -3231,12 +3231,14 @@ BATcount_no_nil(BAT *b, BAT *s)
return ci.ncand;
}
if (BATcheckhash(b)) {
+ MT_rwlock_rdlock(&b->thashlock);
BUN p = 0;
const void *nil = ATOMnilptr(b->ttype);
cnt = ci.ncand;
HASHloop(bi, b->thash, p, nil)
if (canditer_contains(&ci, p + b->hseqbase))
cnt--;
+ MT_rwlock_rdunlock(&b->thashlock);
bat_iterator_end(&bi);
return cnt;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]