Changeset: d79ab9b7a349 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d79ab9b7a349
Modified Files:
        sql/ChangeLog.Jan2022
        sql/storage/store.c
Branch: Jan2022
Log Message:

Merge with Jul2021 branch.


diffs (36 lines):

diff --git a/sql/ChangeLog.Jan2022 b/sql/ChangeLog.Jan2022
--- a/sql/ChangeLog.Jan2022
+++ b/sql/ChangeLog.Jan2022
@@ -1,6 +1,10 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Wed Apr  5 2023 Sjoerd Mullender <[email protected]>
+- When creating a hot snapshot, allow other clients to proceed, even
+  with updating queries.
+
 * Fri Mar 24 2023 Sjoerd Mullender <[email protected]>
 - Increased the size of a variable counting the number of changes made
   to the database (e.g. in case more than a 2 billion rows are added to
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2707,6 +2707,8 @@ store_hot_snapshot_to_stream(sqlstore *s
                goto end; // should already have set a GDK error
        close_stream(plan_stream);
        plan_stream = NULL;
+       MT_lock_unset(&store->lock);
+       locked = 2;
        r = hot_snapshot_write_tar(tar_stream, GDKgetenv("gdk_dbname"), 
buffer_get_buf(plan_buf));
        if (r != GDK_SUCCEED)
                goto end;
@@ -2723,7 +2725,8 @@ store_hot_snapshot_to_stream(sqlstore *s
 end:
        if (locked) {
                BBPtmunlock();
-               MT_lock_unset(&store->lock);
+               if (locked == 1)
+                       MT_lock_unset(&store->lock);
                MT_lock_unset(&store->flush);
        }
        if (plan_stream)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to