Changeset: dca0b9cadf71 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dca0b9cadf71
Modified Files:
        gdk/gdk_heap.c
Branch: Jul2021
Log Message:

Create new file when loading empty, memory-mapped heaps.


diffs (16 lines):

diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -816,6 +816,12 @@ HEAPload_intern(Heap *h, const char *nme
                h->base = GDKmalloc(h->size);
                h->wasempty = true;
        } else {
+               if (h->free == 0) {
+                       int fd = GDKfdlocate(h->farmid, nme, "wb", ext);
+                       if (fd >= 0)
+                               close(fd);
+                       h->wasempty = true;
+               }
                h->base = GDKload(h->farmid, nme, ext, h->free, &h->size, 
h->storage);
        }
        if (h->base == NULL)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to