Changeset: 7bd939f4ba52 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7bd939f4ba52
Modified Files:
gdk/gdk_strimps.c
Branch: string_imprints
Log Message:
Persist strimp when it is fully created
A strimp is fully created when we have computed a bitstring for every
string in the bat.
diffs (32 lines):
diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -621,8 +621,6 @@ persistStrimp(BAT *b)
TRC_DEBUG(ACCELERATOR, "persistStrimp(" ALGOBATFMT "): NOT
persisting strimp\n", ALGOBATPAR(b));
}
-static ATOMIC_TYPE STRMPnthread = ATOMIC_VAR_INIT(0);
-
/* Create */
gdk_return
STRMPcreate(BAT *b, BAT *s)
@@ -643,7 +641,6 @@ STRMPcreate(BAT *b, BAT *s)
return GDK_FAIL;
}
- (void)ATOMIC_INC(&STRMPnthread);
/* Disable this before merging to default */
if (VIEWtparent(b)) {
pb = BBP_cache(VIEWtparent(b));
@@ -678,10 +675,8 @@ STRMPcreate(BAT *b, BAT *s)
MT_lock_unset(&b->batIdxLock);
/* The thread that reaches this point last needs to write the strimp to
disk. */
- (void)ATOMIC_DEC(&STRMPnthread);
- if (STRMPnthread == 0) {
+ if (STRIMP_COMPLETE(pb))
persistStrimp(pb);
- }
TRC_DEBUG(ACCELERATOR, "strimp creation took " LLFMT " usec\n",
GDKusec()-t0);
return GDK_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list