Changeset: 6b2c4962088d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6b2c4962088d Modified Files: gdk/gdk_bbp.c gdk/gdk_heap.c Branch: default Log Message:
Improve keeping track of whether heaps have a file on disk in the BAT dir. diffs (38 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -3532,14 +3532,20 @@ do_backup(const char *srcdir, const char * the BAKDIR, move the heap (preferably with * .new extension) to the correct backup * directory */ - if (file_exists(h->farmid, srcdir, nme, extnew)) + if (file_exists(h->farmid, srcdir, nme, extnew)) { mvret = heap_move(h, srcdir, subcommit ? SUBDIR : BAKDIR, nme, extnew); - else if (file_exists(h->farmid, srcdir, nme, ext)) + } else if (file_exists(h->farmid, srcdir, nme, ext)) { mvret = heap_move(h, srcdir, subcommit ? SUBDIR : BAKDIR, nme, ext); + if (mvret == GDK_SUCCEED) { + /* file no longer in "standard" + * location */ + h->hasfile = false; + } + } } else if (subcommit) { /* if subcommit, we may need to move an * already made backup from BAKDIR to diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -833,6 +833,8 @@ HEAPsave_intern(Heap *h, const char *nme h->wasempty = false; } else { h->dirty = true; + if (store != STORE_MMAP) + h->hasfile = false; } if (lock) MT_lock_unset(lock); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org