Changeset: 9ace5c9b1de1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9ace5c9b1de1
Modified Files:
        README.rst
        gdk/gdk_bat.c
        gdk/gdk_bbp.c
        gdk/gdk_calc.c
        gdk/gdk_calc_convert.c
        gdk/gdk_delta.c
        gdk/gdk_hash.c
        gdk/gdk_heap.c
        gdk/gdk_imprints.c
        gdk/gdk_orderidx.c
        gdk/gdk_project.c
        monetdb5/modules/kernel/batstr.c
        monetdb5/modules/mal/tablet.c
Branch: default
Log Message:

Merge with Jan2022 branch.


diffs (205 lines):

diff --git a/README.rst b/README.rst
--- a/README.rst
+++ b/README.rst
@@ -31,8 +31,8 @@ once an hour.
 .. _MonetDB: https://dev.monetdb.org/hg/MonetDB/
 __ MonetDB_
 
-.. _github: https://github.com/MonetDB/MonetDB
-__ github_
+.. _mirror: https://github.com/MonetDB/MonetDB
+__ mirror_
 
 Building
 --------
@@ -91,8 +91,8 @@ WITH_XML2       Include xml2 support
 WITH_ZLIB       Include zlib support
 ==============  
===============================================================================================
 
-Required packages
-.................
+Required and Optional Packages
+..............................
 
 On Fedora, the following packages are required:
 ``bison``, ``cmake``, ``gcc``, ``pkgconf``, ``python3``.
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -904,8 +904,7 @@ COLcopy(BAT *b, int tt, bool writable, r
                        /* convert number of bits to number of bytes,
                         * and round the latter up to a multiple of
                         * 4 (copy in units of 4 bytes) */
-                       bn->theap->free = (bi.count + 7) / 8;
-                       bn->theap->free = (bn->theap->free + 3) & ~(size_t)3;
+                       bn->theap->free = ((bi.count + 31) / 32) * 4;
                        bn->theap->dirty |= bi.count > 0;
                        memcpy(Tloc(bn, 0), bi.base, bn->theap->free);
                } else {
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -4613,7 +4613,6 @@ BATcalcifthenelse_intern(BATiter *bi,
        }
 
        BATsetcount(bn, cnt);
-       bn->theap->dirty = true;
 
        bn->tsorted = cnt <= 1;
        bn->trevsorted = cnt <= 1;
diff --git a/gdk/gdk_calc_convert.c b/gdk/gdk_calc_convert.c
--- a/gdk/gdk_calc_convert.c
+++ b/gdk/gdk_calc_convert.c
@@ -763,7 +763,6 @@ convert_any_str(BATiter *bi, BAT *bn, st
                        }
                }
        }
-       bn->theap->dirty = true;
        BATsetcount(bn, ci->ncand);
        GDKfree(dst);
        return nils;
@@ -803,7 +802,6 @@ convert_str_var(BATiter *bi, BAT *bn, st
                        }
                }
        }
-       bn->theap->dirty = true;
        BATsetcount(bn, ci->ncand);
        GDKfree(dst);
        return nils;
diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c
--- a/gdk/gdk_hash.c
+++ b/gdk/gdk_hash.c
@@ -143,11 +143,13 @@ HASHnew(Hash *h, int tpe, BUN size, BUN 
                if (HEAPalloc(&h->heaplink, size, h->width, 0) != GDK_SUCCEED)
                        return GDK_FAIL;
                h->heaplink.free = size * h->width;
+               h->heaplink.dirty = true;
                h->Link = h->heaplink.base;
        }
        if (HEAPalloc(&h->heapbckt, mask + HASH_HEADER_SIZE * SIZEOF_SIZE_T / 
h->width, h->width, 0) != GDK_SUCCEED)
                return GDK_FAIL;
        h->heapbckt.free = mask * h->width + HASH_HEADER_SIZE * SIZEOF_SIZE_T;
+       h->heapbckt.dirty = true;
        h->nbucket = mask;
        if (mask & (mask - 1)) {
                h->mask2 = hashmask(mask);
@@ -239,6 +241,8 @@ HASHupgradehashheap(BAT *b)
                                BUN2type v = ((BUN2type *) h->Bckt)[i];
                                ((BUN4type *) h->Bckt)[i] = v == BUN2_NONE ? 
BUN4_NONE : v;
                        }
+                       h->heapbckt.dirty = true;
+                       h->heaplink.dirty = true;
                        break;
                }
 #endif
@@ -262,6 +266,8 @@ HASHupgradehashheap(BAT *b)
                                BUN2type v = ((BUN2type *) h->Bckt)[i];
                                ((BUN8type *) h->Bckt)[i] = v == BUN2_NONE ? 
BUN8_NONE : v;
                        }
+                       h->heapbckt.dirty = true;
+                       h->heaplink.dirty = true;
                        break;
 #endif
                case BUN4:
@@ -279,6 +285,8 @@ HASHupgradehashheap(BAT *b)
                                BUN4type v = ((BUN4type *) h->Bckt)[i];
                                ((BUN8type *) h->Bckt)[i] = v == BUN4_NONE ? 
BUN8_NONE : v;
                        }
+                       h->heapbckt.dirty = true;
+                       h->heaplink.dirty = true;
                        break;
                }
                break;
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -1053,6 +1053,8 @@ HEAP_empty(Heap *heap, size_t nprivate, 
        assert(heap->size - head <= VAR_MAX);
        headp->size = (size_t) (heap->size - head);
        headp->next = 0;
+
+       heap->dirty = true;
 }
 
 gdk_return
@@ -1141,6 +1143,7 @@ HEAP_malloc(BAT *b, size_t nbytes)
                }
                heap = b->tvheap;
                heap->free = newsize;
+               heap->dirty = true;
                MT_lock_unset(&b->theaplock);
                hheader = HEAP_index(heap, 0, HEADER);
 
@@ -1380,6 +1383,8 @@ HEAP_recover(Heap *h, const var_t *offse
                if (h->storage == STORE_MMAP) {
                        if (!(GDKdebug & NOSYNCMASK))
                                (void) MT_msync(h->base, dirty);
+                       else
+                               h->dirty = true;
                } else
                        h->dirty = true;
        }
diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c
--- a/gdk/gdk_imprints.c
+++ b/gdk/gdk_imprints.c
@@ -629,6 +629,7 @@ BATimprints(BAT *b)
                ((size_t *) imprints->imprints.base)[2] = (size_t) 
imprints->dictcnt;
                ((size_t *) imprints->imprints.base)[3] = (size_t) bi.count;
                imprints->imprints.parentid = b->batCacheid;
+               imprints->imprints.dirty = true;
                MT_lock_set(&b->theaplock);
                if (b->batCount != bi.count) {
                        /* bat changed under our feet, can't use imprints */
diff --git a/gdk/gdk_orderidx.c b/gdk/gdk_orderidx.c
--- a/gdk/gdk_orderidx.c
+++ b/gdk/gdk_orderidx.c
@@ -147,6 +147,7 @@ createOIDXheap(BAT *b, bool stable)
                return NULL;
        }
        m->free = (BATcount(b) + ORDERIDXOFF) * SIZEOF_OID;
+       m->dirty = true;
 
        mv = (oid *) m->base;
        *mv++ = ORDERIDX_VERSION;
@@ -375,6 +376,7 @@ GDKmergeidx(BAT *b, BAT**a, int n_ar)
                return GDK_FAIL;
        }
        m->free = (BATcount(b) + ORDERIDXOFF) * SIZEOF_OID;
+       m->dirty = true;
 
        mv = (oid *) m->base;
        *mv++ = ORDERIDX_VERSION;
diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c
--- a/gdk/gdk_project.c
+++ b/gdk/gdk_project.c
@@ -403,6 +403,7 @@ project_str(BATiter *restrict li, struct
 #endif
                memcpy(bn->tvheap->base + h1off, r2i->vh->base, r2i->vhfree);
                bn->tvheap->free = h1off + r2i->vhfree;
+               bn->tvheap->dirty = true;
        }
 
        if (v >= ((var_t) 1 << (8 << bn->tshift)) &&
diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c
--- a/monetdb5/modules/kernel/batstr.c
+++ b/monetdb5/modules/kernel/batstr.c
@@ -39,7 +39,7 @@ batstr_func_has_candidates(const char *f
        return true;
 }
 
-static void
+static inline void
 finalize_ouput(bat *res, BAT *bn, str msg, bool nils, BUN q)
 {
        if (bn && !msg) {
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -940,7 +940,6 @@ SQLworker_column(READERtask *task, int c
                }
        }
        BATsetcount(fmt[col].c, BATcount(fmt[col].c));
-       fmt[col].c->theap->dirty |= BATcount(fmt[col].c) > 0;
 
        return 0;
 }
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to