Changeset: a3f0645e84e8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a3f0645e84e8
Modified Files:
gdk/gdk_storage.c
Branch: default
Log Message:
Improve fix.
If the bat being backed up was still empty (i.e. hasfile is false), but
in parallel the bat is grown to a size that requires mmap (i.e. hasfile
is true), we want the end result to be that hasfile is true.
diffs (18 lines):
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -743,12 +743,12 @@ BATsave_locked(BAT *b, BATiter *bi, BUN
if (b->theap != bi->h) {
assert(b->theap->dirty);
b->theap->wasempty = bi->h->wasempty;
- b->theap->hasfile = bi->h->hasfile;
+ b->theap->hasfile |= bi->h->hasfile;
}
if (b->tvheap && b->tvheap != bi->vh) {
assert(b->tvheap->dirty);
b->tvheap->wasempty = bi->vh->wasempty;
- b->tvheap->hasfile = bi->vh->hasfile;
+ b->tvheap->hasfile |= bi->vh->hasfile;
}
if (size != b->batCount || b->batInserted < b->batCount) {
/* if the sizes don't match, the BAT must be dirty */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]