From ddc93caeae7e84ef48707173f9a50cbb40f34267 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Mon, 1 Dec 2008 23:22:38 +0000 Subject: [PATCH] do not use group commit with non-durable transactions --- src/stasis/logger/logger2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stasis/logger/logger2.c b/src/stasis/logger/logger2.c index 7d8adf0..26cd920 100644 --- a/src/stasis/logger/logger2.c +++ b/src/stasis/logger/logger2.c @@ -217,7 +217,7 @@ static void groupCommit(stasis_log_t* log, lsn_t lsn) { pendingCommits++; int xactcount = TactiveTransactionCount(); - if((xactcount > 1 && pendingCommits < xactcount) || + if((log->is_durable(log) && xactcount > 1 && pendingCommits < xactcount) || (xactcount > 20 && pendingCommits < (int)((double)xactcount * 0.95))) { int retcode; while(ETIMEDOUT != (retcode = pthread_cond_timedwait(&tooFewXacts, &check_commit, &timeout))) {