Changeset: d533a196eef1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d533a196eef1
Modified Files:
        gdk/gdk_batop.c
        gdk/gdk_private.h
        sql/server/rel_exp.c
Branch: properties
Log Message:

Merged with default


diffs (truncated from 452 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -761,3 +761,4 @@ 8c015afafb5903ea59b0e2cffac1138a0d82e007
 cab90a348501b045e19cee5cebcc44f3800bd0a8 Jul2021_21
 cab90a348501b045e19cee5cebcc44f3800bd0a8 Jul2021_SP5_release
 5872f047d97c98d3a848514438b8f97fa446855d Jan2022_11
+025239a5a6f122042798c0f1132a2c6298514e06 Jan2022_13
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -848,6 +848,24 @@ fi
 %endif
 
 %changelog
+* Fri Apr 01 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- Rebuilt.
+- GH#7278: BUG when there is more than one field/filter in the having
+  clause
+
+* Fri Apr  1 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- gdk: Improved speed of BATappend to empty varsized bat: we now just copy
+  the heaps instead of inserting individual values.
+
+* Fri Apr  1 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- monetdb5: Improved parsing speed of blob values, especially on Windows.
+  On Windows, using the locale-aware functions isdigit and isxdigit is
+  comparatively very slow, so we avoid them.
+
+* Tue Mar 29 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- gdk: Improved speed of projection (BATproject) on varsized bats by sharing
+  the data heap (vheap).
+
 * Fri Mar 25 2022 Sjoerd Mullender <[email protected]> - 11.43.11-20220325
 - Rebuilt.
 - GH#7252: Segmentation fault on second run
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -40,7 +40,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M
 # common/options and common/utils)
 set(GDK_VERSION_MAJOR "25")
 set(GDK_VERSION_MINOR "0")
-set(GDK_VERSION_PATCH "3")
+set(GDK_VERSION_PATCH "4")
 set(GDK_VERSION 
"${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}")
 
 # version of the MAPI library (subdirectory clients/mapilib)
@@ -52,7 +52,7 @@ set(MAPI_VERSION "${MAPI_VERSION_MAJOR}.
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras 
or sql)
 set(MONETDB5_VERSION_MAJOR "32")
 set(MONETDB5_VERSION_MINOR "0")
-set(MONETDB5_VERSION_PATCH "4")
+set(MONETDB5_VERSION_PATCH "5")
 set(MONETDB5_VERSION 
"${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}")
 
 # version of the MONETDBE library (subdirectory tools/monetdbe)
@@ -70,5 +70,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ
 # version of the SQL library (subdirectory sql)
 set(SQL_VERSION_MAJOR "12")
 set(SQL_VERSION_MINOR "0")
-set(SQL_VERSION_PATCH "3")
+set(SQL_VERSION_PATCH "4")
 set(SQL_VERSION 
"${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}")
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,33 @@
+monetdb (11.43.13) unstable; urgency=low
+
+  * Rebuilt.
+  * GH#7278: BUG when there is more than one field/filter in the having
+    clause
+
+ -- Sjoerd Mullender <[email protected]>  Fri, 01 Apr 2022 11:31:11 +0200
+
+monetdb (11.43.13) unstable; urgency=low
+
+  * gdk: Improved speed of BATappend to empty varsized bat: we now just copy
+    the heaps instead of inserting individual values.
+
+ -- Sjoerd Mullender <[email protected]>  Fri, 1 Apr 2022 11:31:11 +0200
+
+monetdb (11.43.13) unstable; urgency=low
+
+  * monetdb5: Improved parsing speed of blob values, especially on Windows.
+    On Windows, using the locale-aware functions isdigit and isxdigit is
+    comparatively very slow, so we avoid them.
+
+ -- Sjoerd Mullender <[email protected]>  Fri, 1 Apr 2022 11:31:11 +0200
+
+monetdb (11.43.13) unstable; urgency=low
+
+  * gdk: Improved speed of projection (BATproject) on varsized bats by sharing
+    the data heap (vheap).
+
+ -- Sjoerd Mullender <[email protected]>  Tue, 29 Mar 2022 11:31:11 +0200
+
 monetdb (11.43.11) unstable; urgency=low
 
   * Rebuilt.
diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive
--- a/gdk/ChangeLog-Archive
+++ b/gdk/ChangeLog-Archive
@@ -1,6 +1,14 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Fri Apr  1 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- Improved speed of BATappend to empty varsized bat: we now just copy
+  the heaps instead of inserting individual values.
+
+* Tue Mar 29 2022 Sjoerd Mullender <[email protected]> - 11.43.13-20220401
+- Improved speed of projection (BATproject) on varsized bats by sharing
+  the data heap (vheap).
+
 * Fri Mar 18 2022 Sjoerd Mullender <[email protected]> - 11.43.11-20220325
 - Fixed a race condition which could cause a too large size being written
   for a .theap file to the BBP.dir file after the correct size file had
diff --git a/gdk/ChangeLog.Jan2022 b/gdk/ChangeLog.Jan2022
--- a/gdk/ChangeLog.Jan2022
+++ b/gdk/ChangeLog.Jan2022
@@ -1,7 +1,3 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
-* Tue Mar 29 2022 Sjoerd Mullender <[email protected]>
-- Improved speed of projection (BATproject) on varsized bats by sharing
-  the data heap (vheap).
-
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -527,6 +527,7 @@ gdk_return
 BATextend(BAT *b, BUN newcap)
 {
        size_t theap_size;
+       gdk_return rc = GDK_SUCCEED;
 
        assert(newcap <= BUN_MAX);
        BATcheck(b, GDK_FAIL);
@@ -549,14 +550,18 @@ BATextend(BAT *b, BUN newcap)
        } else {
                theap_size = (size_t) newcap << b->tshift;
        }
-       b->batCapacity = newcap;
 
+       MT_lock_set(&b->theaplock);
        if (b->theap->base) {
                TRC_DEBUG(HEAP, "HEAPgrow in BATextend %s %zu %zu\n",
                          b->theap->filename, b->theap->size, theap_size);
-               return HEAPgrow(&b->theaplock, &b->theap, theap_size, 
b->batRestricted == BAT_READ);
+               rc = HEAPgrow(&b->theap, theap_size, b->batRestricted == 
BAT_READ);
        }
-       return GDK_SUCCEED;
+
+       b->batCapacity = newcap;
+       MT_lock_unset(&b->theaplock);
+
+       return rc;
 }
 
 
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -138,11 +138,14 @@ insert_string_bat(BAT *b, BATiter *ni, s
                                        MT_thread_setalgorithm("append vheap");
                                }
 
-                               if (HEAPgrow(&b->theaplock, &b->tvheap, toff + 
ni->vh->size, force) != GDK_SUCCEED) {
+                               MT_lock_set(&b->theaplock);
+                               if (HEAPgrow(&b->tvheap, toff + ni->vh->size, 
force) != GDK_SUCCEED) {
+                                       MT_lock_unset(&b->theaplock);
                                        return GDK_FAIL;
                                }
                                memcpy(b->tvheap->base + toff, ni->vh->base, 
ni->vhfree);
                                b->tvheap->free = toff + ni->vhfree;
+                               MT_lock_unset(&b->theaplock);
                        }
                }
        }
@@ -418,8 +421,11 @@ append_varsized_bat(BAT *b, BATiter *ni,
        if (BATcount(b) == 0 && BATatoms[b->ttype].atomFix == NULL &&
            ci->tpe == cand_dense && ci->ncand == ni->count) {
                /* just copy the heaps */
-               if (HEAPgrow(&b->theaplock, &b->tvheap, ni->vhfree, false) != 
GDK_SUCCEED)
+               MT_lock_set(&b->theaplock);
+               if (HEAPgrow(&b->tvheap, ni->vhfree, false) != GDK_SUCCEED) {
+                       MT_lock_unset(&b->theaplock);
                        return GDK_FAIL;
+               }
                memcpy(b->theap->base, ni->base, ni->hfree);
                memcpy(b->tvheap->base, ni->vh->base, ni->vhfree);
                b->theap->free = ni->hfree;
@@ -437,6 +443,7 @@ append_varsized_bat(BAT *b, BATiter *ni,
                b->tminpos = ni->minpos;
                b->tmaxpos = ni->maxpos;
                b->tunique_est = ni->unique_est;
+               MT_lock_unset(&b->theaplock);
                return GDK_SUCCEED;
        }
        /* copy data from n to b */
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -86,16 +86,15 @@ decompose_filename(str nme)
        return ext;
 }
 
+/* this function is called with the theaplock held */
 gdk_return
-HEAPgrow(MT_Lock *lock, Heap **hp, size_t size, bool mayshare)
+HEAPgrow(Heap **hp, size_t size, bool mayshare)
 {
        Heap *new;
 
-       MT_lock_set(lock);
        ATOMIC_BASE_TYPE refs = ATOMIC_GET(&(*hp)->refs);
        if ((refs & HEAPREFS) == 1) {
                gdk_return rc = HEAPextend((*hp), size, mayshare);
-               MT_lock_unset(lock);
                return rc;
        }
        new = GDKmalloc(sizeof(Heap));
@@ -126,7 +125,6 @@ HEAPgrow(MT_Lock *lock, Heap **hp, size_
                        new = NULL;
                }
        }
-       MT_lock_unset(lock);
        return new ? GDK_SUCCEED : GDK_FAIL;
 }
 
@@ -1118,11 +1116,14 @@ HEAP_malloc(BAT *b, size_t nbytes)
 
                /* Increase the size of the heap. */
                TRC_DEBUG(HEAP, "HEAPextend in HEAP_malloc %s %zu %zu\n", 
heap->filename, heap->size, newsize);
-               if (HEAPgrow(&b->theaplock, &b->tvheap, newsize, false) != 
GDK_SUCCEED) {
+               MT_lock_set(&b->theaplock);
+               if (HEAPgrow(&b->tvheap, newsize, false) != GDK_SUCCEED) {
+                       MT_lock_unset(&b->theaplock);
                        return (var_t) -1;
                }
                heap = b->tvheap;
                heap->free = newsize;
+               MT_lock_unset(&b->theaplock);
                hheader = HEAP_index(heap, 0, HEADER);
 
                blockp = HEAP_index(heap, block, CHUNK);
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -202,7 +202,7 @@ gdk_return HEAPcopy(Heap *dst, Heap *src
        __attribute__((__visibility__("hidden")));
 void HEAPfree(Heap *h, bool remove)
        __attribute__((__visibility__("hidden")));
-gdk_return HEAPgrow(MT_Lock *lock, Heap **old, size_t size, bool mayshare)
+gdk_return HEAPgrow(Heap **old, size_t size, bool mayshare)
        __attribute__((__visibility__("hidden")));
 gdk_return HEAPload(Heap *h, const char *nme, const char *ext, bool trunc)
        __attribute__((__warn_unused_result__))
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -188,14 +188,17 @@ strPut(BAT *b, var_t *dst, const void *V
        BUN off;
 
        if (h->free == 0) {
+               MT_lock_set(&b->theaplock);
                if (h->size < GDK_STRHASHTABLE * sizeof(stridx_t) + BATTINY * 
GDK_VARALIGN) {
-                       if (HEAPgrow(&b->theaplock, &b->tvheap, 
GDK_STRHASHTABLE * sizeof(stridx_t) + BATTINY * GDK_VARALIGN, true) != 
GDK_SUCCEED) {
+                       if (HEAPgrow(&b->tvheap, GDK_STRHASHTABLE * 
sizeof(stridx_t) + BATTINY * GDK_VARALIGN, true) != GDK_SUCCEED) {
+                               MT_lock_unset(&b->theaplock);
                                return (var_t) -1;
                        }
                        h = b->tvheap;
                }
                h->free = GDK_STRHASHTABLE * sizeof(stridx_t);
                h->dirty = true;
+               MT_lock_unset(&b->theaplock);
 #ifdef NDEBUG
                memset(h->base, 0, h->free);
 #else
@@ -279,10 +282,13 @@ strPut(BAT *b, var_t *dst, const void *V
                        return (var_t) -1;
                }
                TRC_DEBUG(HEAP, "HEAPextend in strPut %s %zu %zu\n", 
h->filename, h->size, newsize);
-               if (HEAPgrow(&b->theaplock, &b->tvheap, newsize, true) != 
GDK_SUCCEED) {
+               MT_lock_set(&b->theaplock);
+               if (HEAPgrow(&b->tvheap, newsize, true) != GDK_SUCCEED) {
+                       MT_lock_unset(&b->theaplock);
                        return (var_t) -1;
                }
                h = b->tvheap;
+               MT_lock_unset(&b->theaplock);
 
                /* make bucket point into the new heap */
                bucket = ((stridx_t *) h->base) + off;
@@ -294,8 +300,10 @@ strPut(BAT *b, var_t *dst, const void *V
        if (pad > 0)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to