do not use group commit with non-durable transactions

This commit is contained in:
Sears Russell 2008-12-01 23:22:38 +00:00
parent 2dcc6598d2
commit ddc93caeae

View file

@ -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))) {