Changeset: 07da947053f9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/07da947053f9 Modified Files: clients/Tests/exports.stable.out gdk/gdk_logger.c gdk/gdk_logger.h gdk/gdk_logger_internals.h sql/storage/store.c Branch: group-commit Log Message:
Merge with default. diffs (truncated from 13311 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 <sjo...@acm.org> - 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 <sjo...@acm.org> - 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 <sjo...@acm.org> - 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 <sjo...@acm.org> - 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 <sjo...@acm.org> - 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 <sjo...@acm.org> 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 <sjo...@acm.org> 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 <sjo...@acm.org> 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 <sjo...@acm.org> 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 <sjo...@acm.org> - 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 <sjo...@acm.org> - 11.43.13-20220401 +- Improved speed of projection (BATproject) on varsized bats by sharing + the data heap (vheap). + * Fri Mar 18 2022 Sjoerd Mullender <sjo...@acm.org> - 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/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -774,22 +774,34 @@ typedef enum { BAT_APPEND, /* only reads and appends allowed */ } restrict_t; +/* batDirtydesc: should be set (true) if any of the following fields + * have changed since the bat was last saved: hseqbase, batRestricted, + * batTransient, batCount, and the theap properties tkey, tseqbase, + * tsorted, trevsorted, twidth, tshift, tnonil, tnil, tnokey, tnosorted, + * tnorevsorted, tminpos, tmaxpos, and tunique_est; in addition, the + * value should be set if the BBP field BBP_logical(bid) is changed. + * + * theaplock: this lock should be held when reading or writing any of + * the fields mentioned above for batDirtydesc, and also when reading or + * writing any of the following fields: batDirtydesc, theap, tvheap, + * batInserted, batCapacity. There is no need for the lock if the bat + * cannot possibly be modified concurrently, e.g. when it is new and not + * yet returned to the interpreter or during system initialization. */ typedef struct BAT { /* static bat properties */ oid hseqbase; /* head seq base */ MT_Id creator_tid; /* which thread created it */ bat batCacheid; /* index into BBP */ + role_t batRole; /* role of the bat */ /* dynamic bat properties */ - restrict_t batRestricted; /* access privileges */ - bool batTransient; /* should the BAT persist on disk? */ + restrict_t batRestricted:2; /* access privileges */ bool + batTransient:1, /* should the BAT persist on disk? */ batCopiedtodisk:1, /* once written */ batDirtyflushed:1, /* was dirty before commit started? */ batDirtydesc:1; /* bat descriptor dirty marker */ - uint16_t /* adjacent bit fields are packed together (if they fit) */ - selcnt:10; /* how often used in equi select without hash */ - role_t batRole; /* role of the bat */ + uint16_t selcnt; /* how often used in equi select without hash */ uint16_t unused; /* value=0 for now (sneakily used by mat.c) */ int batSharecnt; /* incoming view count */ @@ -947,6 +959,7 @@ typedef struct BATiter { void *base; Heap *vh; BUN count; + BUN baseoff; uint16_t width; uint8_t shift; int8_t type; @@ -954,13 +967,24 @@ typedef struct BATiter { BUN hfree, vhfree; BUN minpos, maxpos; double unique_est; + bool key:1, + nonil:1, + nil:1, + sorted:1, + revsorted:1, + hdirty:1, + vhdirty:1, + dirtydesc:1, + copiedtodisk:1, + transient:1; + restrict_t restricted:2; +#ifndef NDEBUG + bool locked:1; +#endif union { oid tvid; bool tmsk; }; -#ifndef NDEBUG - bool locked; -#endif } BATiter; static inline BATiter @@ -973,6 +997,7 @@ bat_iterator_nolock(BAT *b) .b = b, .h = b->theap, .base = b->theap->base ? b->theap->base + (b->tbaseoff << b->tshift) : NULL, + .baseoff = b->tbaseoff, .vh = b->tvheap, .count = b->batCount, .width = b->twidth, @@ -989,6 +1014,19 @@ bat_iterator_nolock(BAT *b) .minpos = isview ? BUN_NONE : b->tminpos, .maxpos = isview ? BUN_NONE : b->tmaxpos, .unique_est = b->tunique_est, + .key = b->tkey, + .nonil = b->tnonil, + .nil = b->tnil, + .sorted = b->tsorted, + .revsorted = b->trevsorted, + /* only look at heap dirty flag if we own it */ + .hdirty = b->theap->parentid == b->batCacheid && b->theap->dirty, + /* also, if there is no vheap, it's not dirty */ + .vhdirty = b->tvheap && b->tvheap->parentid == b->batCacheid && b->tvheap->dirty, + .dirtydesc = b->batDirtydesc, + .copiedtodisk = b->batCopiedtodisk, + .transient = b->batTransient, + .restricted = b->batRestricted, #ifndef NDEBUG .locked = false, #endif @@ -1023,6 +1061,20 @@ bat_iterator(BAT *b) return bi; } +/* return a copy of a BATiter instance; needs to be released with + * bat_iterator_end */ +static inline BATiter +bat_iterator_copy(BATiter *bip) +{ + assert(bip); + assert(bip->locked); + if (bip->h) + HEAPincref(bip->h); + if (bip->vh) + HEAPincref(bip->vh); + return *bip; +} + static inline void bat_iterator_end(BATiter *bip) { @@ -1252,6 +1304,10 @@ gdk_export restrict_t BATgetaccess(BAT * (b)->batDirtydesc || \ (b)->theap->dirty || \ ((b)->tvheap != NULL && (b)->tvheap->dirty)) +#define BATdirtybi(bi) (!(bi).copiedtodisk || \ + (bi).dirtydesc || \ + (bi).hdirty || \ + (bi).vhdirty) #define BATdirtydata(b) (!(b)->batCopiedtodisk || \ (b)->theap->dirty || \ ((b)->tvheap != NULL && (b)->tvheap->dirty)) @@ -1359,8 +1415,6 @@ gdk_export gdk_return BATsort(BAT **sort gdk_export void GDKqsort(void *restrict h, void *restrict t, const void *restrict base, size_t n, int hs, int ts, int tpe, bool reverse, bool nilslast); -#define BATtordered(b) ((b)->tsorted) -#define BATtrevordered(b) ((b)->trevsorted) /* BAT is dense (i.e., BATtvoid() is true and tseqbase is not NIL) */ #define BATtdense(b) (!is_oid_nil((b)->tseqbase) && \ ((b)->tvheap == NULL || (b)->tvheap->free == 0)) @@ -1368,7 +1422,8 @@ gdk_export void GDKqsort(void *restrict #define BATtvoid(b) (BATtdense(b) || (b)->ttype==TYPE_void) #define BATtkey(b) ((b)->tkey || BATtdense(b)) -/* set some properties that are trivial to deduce */ +/* set some properties that are trivial to deduce; called with theaplock + * held */ static inline void BATsettrivprop(BAT *b) { diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -961,8 +961,8 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT gids = (const oid *) Tloc(g, 0); BATiter bi = bat_iterator(b); - nils = dosum(bi.base, b->tnonil, b->hseqbase, &ci, - Tloc(bn, 0), ngrp, b->ttype, tp, gids, min, max, + nils = dosum(bi.base, bi.nonil, b->hseqbase, &ci, + Tloc(bn, 0), ngrp, bi.type, tp, gids, min, max, skip_nils, abort_on_error, true, __func__, &algo); bat_iterator_end(&bi); @@ -1191,8 +1191,8 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (ci.ncand == 0) return GDK_SUCCEED; BATiter bi = bat_iterator(b); - BUN nils = dosum(bi.base, b->tnonil, b->hseqbase, &ci, - res, true, b->ttype, tp, &min, min, max, + BUN nils = dosum(bi.base, bi.nonil, b->hseqbase, &ci, + res, true, bi.type, tp, &min, min, max, skip_nils, abort_on_error, nil_if_empty, __func__, &algo); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org