Changeset: cc4d477cc939 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cc4d477cc939
Modified Files:
        gdk/gdk_bbp.c
Branch: Jul2021
Log Message:

Removed islocked assertions: they trigger for some reason on Windows 7.


diffs (63 lines):

diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -129,24 +129,11 @@ static bool havehge = false;
 
 #define BBPnamecheck(s) (BBPtmpcheck(s) ? strtol((s) + 4, NULL, 8) : 0)
 
-#ifndef NDEBUG
-static inline bool
-islocked(MT_Lock *l)
-{
-       if (MT_lock_try(l)) {
-               MT_lock_unset(l);
-               return false;
-       }
-       return true;
-}
-#endif
-
 static void
 BBP_insert(bat i)
 {
        bat idx = (bat) (strHash(BBP_logical(i)) & BBP_mask);
 
-       assert(islocked(&BBPnameLock));
        BBP_next(i) = BBP_hash[idx];
        BBP_hash[idx] = i;
 }
@@ -158,7 +145,6 @@ BBP_delete(bat i)
        const char *s = BBP_logical(i);
        bat idx = (bat) (strHash(s) & BBP_mask);
 
-       assert(islocked(&BBPnameLock));
        for (h += idx; (i = *h) != 0; h = &BBP_next(i)) {
                if (strcmp(BBP_logical(i), s) == 0) {
                        *h = BBP_next(i);
@@ -400,7 +386,6 @@ BBPextend(int idx, bool buildhash)
 static gdk_return
 recover_dir(int farmid, bool direxists)
 {
-       assert(islocked(&GDKtmLock));
        if (direxists) {
                /* just try; don't care about these non-vital files */
                if (GDKunlink(farmid, BATDIR, "BBP", "bak") != GDK_SUCCEED)
@@ -1410,10 +1395,6 @@ BBPdir_first(bool subcommit, lng logno, 
        int n = 0;
        lng ologno, otransid;
 
-#ifndef NDEBUG
-       assert(islocked(&GDKtmLock));
-#endif
-
        if (obbpfp)
                *obbpfp = NULL;
        *nbbpfp = NULL;
@@ -2874,7 +2855,6 @@ BBPprepare(bool subcommit)
        str bakdirpath, subdirpath;
        gdk_return ret = GDK_SUCCEED;
 
-       assert(islocked(&GDKtmLock));
        if(!(bakdirpath = GDKfilepath(0, NULL, BAKDIR, NULL)))
                return GDK_FAIL;
        if(!(subdirpath = GDKfilepath(0, NULL, SUBDIR, NULL))) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to