Changeset: 38a0152db8db for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=38a0152db8db
Modified Files:
gdk/gdk_storage.c
Branch: Jul2015
Log Message:
Don't property check or shrink heaps in BATsave.
BATsave can be called (from BBPdync) without any fixes (physical
reference count zero), so we need to be very careful not to do
anything for which we need a fix.
diffs (41 lines):
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -728,13 +728,6 @@ BATsave(BAT *bd)
BAT *b = bd;
BATcheck(b, "BATsave", GDK_FAIL);
- /* there is a possibility that BATsave gets called with a
- * pointer to a BAT that has *no* fixes (refs == 0), and so
- * the heaps may not be in core, in which case BATmirror()
- * would not find the mirror (this can happen when BATsave
- * gets called during a (sub)commit after the BAT had been
- * trimmed) */
- CHECKDEBUG if (BATmirror(b)) BATassertProps(b);
/* views cannot be saved, but make an exception for
* force-remapped views */
@@ -814,23 +807,6 @@ BATsave(BAT *bd)
if (err == GDK_SUCCEED) {
bd->batCopiedtodisk = 1;
DESCclean(bd);
- /* see comment with BATassertProps() at the top of this
function */
- if (BATmirror(bd)) {
- if (bd->htype && bd->H->heap.storage == STORE_MMAP) {
- HEAPshrink(&bd->H->heap, bd->H->heap.free);
- if (bd->batCapacity > bd->H->heap.size >>
bd->H->shift)
- bd->batCapacity = (BUN)
(bd->H->heap.size >> bd->H->shift);
- }
- if (bd->ttype && bd->T->heap.storage == STORE_MMAP) {
- HEAPshrink(&bd->T->heap, bd->T->heap.free);
- if (bd->batCapacity > bd->T->heap.size >>
bd->T->shift)
- bd->batCapacity = (BUN)
(bd->T->heap.size >> bd->T->shift);
- }
- if (bd->H->vheap && bd->H->vheap->storage == STORE_MMAP)
- HEAPshrink(bd->H->vheap, bd->H->vheap->free);
- if (bd->T->vheap && bd->T->vheap->storage == STORE_MMAP)
- HEAPshrink(bd->T->vheap, bd->T->vheap->free);
- }
return GDK_SUCCEED;
}
return err;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list