Changeset: e1b5841a1f6a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e1b5841a1f6a
Modified Files:
        gdk/gdk_logger.c
Branch: default
Log Message:

Only delete bat during startup if it is not in use.
If bat is mentioned multiple times in catalog_bid, and all but one row
is in dcatalog (either that, or all rows are in dcatalog), then we
should keep the bat.  Only if all occurrences of a bat in catalog_bid
are in dcatalog (and the bat exists) can we destroy it.


diffs (12 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1507,7 +1507,7 @@ bm_get_counts(logger *lg)
                        assert(b);
                        cnt = BATcount(b);
                } else {
-                       lid = BBP_desc(bids[p]) ? 1 : -1;
+                       lid = BBP_desc(bids[p]) && log_find(lg->catalog_bid, 
lg->dcatalog, bids[p]) == BUN_NONE ? 1 : -1;
                }
                if (BUNappend(lg->catalog_cnt, &cnt, false) != GDK_SUCCEED)
                        return GDK_FAIL;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to