Changeset: d90a306fb1ac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d90a306fb1ac
Modified Files:
gdk/gdk_bat.c
Branch: Jul2021
Log Message:
Add checks that heaps have the correct name.
diffs (34 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -2464,6 +2464,7 @@ BATassertProps(BAT *b)
int (*cmpf)(const void *, const void *);
int cmp;
const void *prev = NULL, *valp, *nilp;
+ char filename[sizeof(b->theap->filename)];
/* do the complete check within a lock */
MT_lock_set(&b->theaplock);
@@ -2507,6 +2508,22 @@ BATassertProps(BAT *b)
} else
assert(b->theap->size >> b->tshift >= b->batCapacity);
}
+ strconcat_len(filename, sizeof(filename),
+ BBP_physical(b->theap->parentid),
+ b->ttype == TYPE_str ? b->twidth == 1 ? ".tail1" :
b->twidth == 2 ? ".tail2" :
+#if SIZEOF_VAR_T == 8
+ b->twidth == 4 ? ".tail4" :
+#endif
+ ".tail" : ".tail",
+ NULL);
+ assert(strcmp(b->theap->filename, filename) == 0);
+ if (b->tvheap) {
+ strconcat_len(filename, sizeof(filename),
+ BBP_physical(b->tvheap->parentid),
+ ".theap",
+ NULL);
+ assert(strcmp(b->tvheap->filename, filename) == 0);
+ }
/* void and str imply varsized */
if (b->ttype == TYPE_void ||
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list