Changeset: 2be2746f17ea for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2be2746f17ea
Branch: Jul2021_debug
Log Message:

merged with jul2021


diffs (66 lines):

diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -140,6 +140,7 @@ VIEWcreate(oid seq, BAT *b)
                }
                if (bn->tvheap) {
                        BBPunshare(bn->tvheap->parentid);
+                       BBPunfix(bn->tvheap->parentid);
                        HEAPdecref(bn->tvheap, false);
                }
                HEAPdecref(bn->theap, false);
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -91,8 +91,10 @@ insert_string_bat(BAT *b, BAT *n, struct
                /* we can share the vheaps, so we then only need to
                 * append the offsets */
                MT_lock_set(&b->theaplock);
-               if (b->tvheap->parentid != b->batCacheid)
+               if (b->tvheap->parentid != b->batCacheid) {
                        BBPunshare(b->tvheap->parentid);
+                       BBPunfix(b->tvheap->parentid);
+               }
                HEAPdecref(b->tvheap, b->tvheap->parentid == b->batCacheid);
                HEAPincref(ni.vh);
                b->tvheap = ni.vh;
@@ -381,8 +383,10 @@ append_varsized_bat(BAT *b, BAT *n, stru
                /* make sure locking happens in a predictable order:
                 * lowest id first */
                MT_lock_set(&b->theaplock);
-               if (b->tvheap->parentid != b->batCacheid)
+               if (b->tvheap->parentid != b->batCacheid) {
                        BBPunshare(b->tvheap->parentid);
+                       BBPunfix(b->tvheap->parentid);
+               }
                BBPshare(ni.vh->parentid);
                HEAPdecref(b->tvheap, true);
                HEAPincref(ni.vh);
@@ -440,12 +444,14 @@ append_varsized_bat(BAT *b, BAT *n, stru
                        GDKfree(h);
                        return GDK_FAIL;
                }
-               BBPunshare(b->tvheap->parentid);
+               bat parid = b->tvheap->parentid;
+               BBPunshare(parid);
                MT_lock_set(&b->theaplock);
                HEAPdecref(b->tvheap, false);
                ATOMIC_INIT(&h->refs, 1);
                b->tvheap = h;
                MT_lock_unset(&b->theaplock);
+               BBPunfix(parid);
        }
        /* copy data from n to b */
        r = BUNlast(b);
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2210,7 +2210,7 @@ logger_next_logfile(logger *lg, ulng ts)
 {
        if (!lg->pending || !lg->pending->next)
                return 0;
-       if (lg->pending->last_ts < ts)
+       if (lg->pending->last_ts <= ts)
                return lg->pending->id;
        return 0;
 }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to