Changeset: a5743f049052 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5743f049052
Modified Files:
        sql/storage/store.c
Branch: Oct2014
Log Message:

Once we logged enough 'updates', we try to flush the log as quickly as
possible (ie check for silent moment (no active transactions) every 50 msec).
In the old scheme we tried to flush only every 30seconds, but the change
for 'no active transactions' is then to small.


diffs (21 lines):

diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1581,11 +1581,15 @@ store_manager(void)
                                return;
                }
                MT_lock_set(&bs_lock, "store_manager");
-               if (store_nr_active || GDKexiting() ||
-                       logger_funcs.changes() < 1000) {
+               if (GDKexiting() || logger_funcs.changes() < 1000) {
                        MT_lock_unset(&bs_lock, "store_manager");
                        continue;
                }
+               while (store_nr_active) { /* find a moment to flush */
+                       MT_lock_unset(&bs_lock, "store_manager");
+                       MT_sleep_ms(50);
+                       MT_lock_set(&bs_lock, "store_manager");
+               }
                logging = 1;
                /* make sure we reset all transactions on re-activation */
                gtrans->wstime = timestamp();
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to