Changeset: 566493e94350 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/566493e94350
Modified Files:
        gdk/gdk_logger.c
        sql/test/concurrent/Tests/All
Branch: Sep2022
Log Message:

Fix race condition in gdk logger.


diffs (21 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -3114,7 +3114,7 @@ log_tstart(logger *lg, bool flushnow, ul
 {
        MT_lock_set(&lg->rotation_lock);
        log_lock(lg);
-       if (flushnow || lg->request_rotation) {
+       if (flushnow || (lg->request_rotation && ATOMIC_GET(&lg->refcount) == 
0)) {
                lg->id++;
                log_close_output(lg);
                /* start new file */
diff --git a/sql/test/concurrent/Tests/All b/sql/test/concurrent/Tests/All
--- a/sql/test/concurrent/Tests/All
+++ b/sql/test/concurrent/Tests/All
@@ -1,3 +1,5 @@
+segments-corruption
 simple_select
 crash_on_concurrent_use.SF-1411926
 smart-segment-merge
+segments-corruption
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to