summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVamsi Krishna <vamsi.krishna@mongodb.com>2017-08-23 12:01:19 +1000
committerVamsi Krishna <vamsi.krishna@mongodb.com>2017-08-23 12:01:19 +1000
commit9bb78caa4399bb961ec54072cdcb4b2f31936786 (patch)
treef948514793f5975266f2030a61012ab962edf301
parent0071856fa9018f16b40f0c7c492fd445f673060d (diff)
downloadmongo-backport-716_issue_server-28637_wt_journal_files_accumulate.tar.gz
BACKPORT-716 wt journal files accumulate SERVER-28637backport-716_issue_server-28637_wt_journal_files_accumulate
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index f48fff37b0b..84c51cd197f 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -253,6 +253,13 @@ WiredTigerKVEngine::WiredTigerKVEngine(const std::string& canonicalName,
msgassertedNoTrace(28718, s.reason());
}
invariantWTOK(_conn->close(_conn, NULL));
+ // After successful recovery, remove the journal directory.
+ try {
+ boost::filesystem::remove_all(journalPath);
+ } catch (std::exception& e) {
+ error() << "error removing journal dir " << journalPath.string() << ' ' << e.what();
+ throw;
+ }
}
// This setting overrides the earlier setting because it is later in the config string.
ss << ",log=(enabled=false),";