Changeset: ed20c4ab0168 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ed20c4ab0168
Modified Files:
gdk/gdk_bbp.c
gdk/gdk_storage.c
Branch: Jul2021
Log Message:
Some fixes for swapped bats.
diffs (42 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2137,7 +2137,7 @@ incref(bat i, bool logical, bool lock)
* reference, getting the parent BAT descriptor is
* superfluous, but not too expensive, so we do it anyway. */
if (!logical && (b = BBP_desc(i)) != NULL) {
- if (b->theap->parentid != i) {
+ if (b->theap && b->theap->parentid != i) {
pb = BATdescriptor(b->theap->parentid);
if (pb == NULL)
return 0;
@@ -2179,7 +2179,7 @@ incref(bat i, bool logical, bool lock)
tp = tvp = 0;
refs = ++BBP_lrefs(i);
} else {
- tp = b->theap->parentid == i ? 0 : b->theap->parentid;
+ tp = b->theap == NULL || b->theap->parentid == i ? 0 :
b->theap->parentid;
assert(tp >= 0);
tvp = b->tvheap == 0 || b->tvheap->parentid == i ? 0 :
b->tvheap->parentid;
refs = ++BBP_refs(i);
@@ -2307,6 +2307,8 @@ decref(bat i, bool logical, bool release
if (b && refs == 0) {
tp = VIEWtparent(b);
tvp = VIEWvtparent(b);
+ if (tp || tvp)
+ BBP_status_on(i, BBPHOT);
}
}
}
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -795,7 +795,7 @@ BATsave(BAT *bd)
/* start saving data */
nme = BBP_physical(b->batCacheid);
- if (b->theap->base == NULL) {
+ if (b->ttype != TYPE_void && b->theap->base == NULL) {
assert(BBP_status(bd->batCacheid) & BBPSWAPPED);
if (dosync && !(GDKdebug & NOSYNCMASK)) {
int fd = GDKfdlocate(b->theap->farmid, nme, "rb+",
gettailname(b));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list