Changeset: 4be3614ac012 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4be3614ac012 Modified Files: gdk/gdk.h gdk/gdk_align.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_private.h gdk/gdk_sample.c gdk/gdk_storage.c Branch: histograms Log Message:
Merged with default diffs (truncated from 6059 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.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -776,22 +776,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 */ @@ -963,14 +975,18 @@ typedef struct BATiter { sorted:1, revsorted:1, hdirty:1, - vhdirty: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 @@ -1005,8 +1021,14 @@ bat_iterator_nolock(BAT *b) .nil = b->tnil, .sorted = b->tsorted, .revsorted = b->trevsorted, - .hdirty = b->theap->dirty, - .vhdirty = b->tvheap && b->tvheap->dirty, + /* 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 @@ -1284,6 +1306,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)) @@ -1398,7 +1424,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 @@ -3746,8 +3746,11 @@ BATmin_skipnil(BAT *b, void *aggr, bit s bi.width, 0, bi.count, ATOMnilptr(bi.type), 1, 1); if (r == 0) { - bi.nonil = true; + /* there are no nils, record that */ + MT_lock_set(&b->theaplock); + b->tnonil = true; b->batDirtydesc = true; + MT_lock_unset(&b->theaplock); } } else { r = 0; diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -262,11 +262,11 @@ BATmaterialize(BAT *b) b->tbaseoff = 0; b->theap->dirty = true; b->tunique_est = is_oid_nil(t) ? 1.0 : (double) b->batCount; - MT_lock_unset(&b->theaplock); b->ttype = TYPE_oid; BATsetdims(b, 0); b->batDirtydesc = true; BATsetcount(b, b->batCount); + MT_lock_unset(&b->theaplock); HEAPdecref(h, false); if (vh) HEAPdecref(vh, true); 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; } @@ -806,7 +811,7 @@ COLcopy(BAT *b, int tt, bool writable, r _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
