Changeset: 41dd20d5e928 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=41dd20d5e928
Modified Files:
gdk/gdk_hash.c
Branch: partioned-hash
Log Message:
Release hashlock before persisting new hash to disk.
In this way, other threads that are waiting for the hash can already
continue while this thread is saving the data to disk.
diffs (22 lines):
diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c
--- a/gdk/gdk_hash.c
+++ b/gdk/gdk_hash.c
@@ -427,6 +427,9 @@ BAThash(BAT *b)
}
}
#endif
+ b->T->hash = h;
+ /* unlock before potentially expensive sync */
+ MT_lock_unset(&GDKhashLock(abs(b->batCacheid)), "BAThash");
t0 = GDKusec();
if ((BBP_status(b->batCacheid) & BBPEXISTING) &&
b->batInserted == b->batCount &&
@@ -449,7 +452,7 @@ BAThash(BAT *b)
} else {
ALGODEBUG fprintf(stderr, "#BAThash: NOT persisting
hash %d\n", b->batCacheid);
}
- b->T->hash = h;
+ return GDK_SUCCEED;
}
bailout:
MT_lock_unset(&GDKhashLock(abs(b->batCacheid)), "BAThash");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list