From 769b7615dd106797cfaa741be55f055a9fa57273 Mon Sep 17 00:00:00 2001 From: sears Date: Fri, 4 Nov 2011 20:55:27 +0000 Subject: [PATCH] disable periodic force writes in merger (now handled by stasis instead); fix concurrency bug where merge held writelock while forcing data git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@3285 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- merger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/merger.cpp b/merger.cpp index c46d51c..b10a1f6 100644 --- a/merger.cpp +++ b/merger.cpp @@ -128,10 +128,10 @@ void * merge_scheduler::memMergeThread() { // 5: force c1' - rwlc_writelock(ltable_->header_mut); - //force write the new tree to disk - c1_prime->force(xid); // XXX put before the writelock? + c1_prime->force(xid); + + rwlc_writelock(ltable_->header_mut); merge_count++; DEBUG("mmt:\tmerge_count %lld #bytes written %lld\n", stats.stats_merge_count, stats.output_size()); @@ -332,7 +332,7 @@ void * merge_scheduler::diskMergeThread() } static void periodically_force(int xid, int *i, diskTreeComponent * forceMe, stasis_log_t * log) { - if(*i > mergeManager::FORCE_INTERVAL) { + if(false && *i > mergeManager::FORCE_INTERVAL) { if(forceMe) forceMe->force(xid); log->force_tail(log, LOG_FORCE_WAL); *i = 0;