diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-11-26 17:07:11 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-11-27 16:40:34 -0500 |
commit | fe363010e4b2b953c9876608861c02df4c8662ec (patch) | |
tree | 469b805d555a32b6f27c1fcee80739e89d15c039 /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | |
parent | d36eac67be457c8a4e11373b0332e2d8d54975e1 (diff) | |
download | mongo-fe363010e4b2b953c9876608861c02df4c8662ec.tar.gz |
SERVER-16119: faster WT shutdown race avoidance
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 01e4e6bbaa9..0ad0d32e9bf 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -330,7 +330,7 @@ namespace mongo { { boost::mutex::scoped_lock lk( _identToDropMutex ); _identToDrop.insert( uri ); - _epoch++; + _epoch.fetchAndAdd(1); } _sessionCache->closeAll(); return false; @@ -340,11 +340,14 @@ namespace mongo { return false; } - bool WiredTigerKVEngine::haveDropsQueued() const { + void WiredTigerKVEngine::syncSizeInfoOccasionally() const { if ( _sizeStorerSyncTracker.intervalHasElapsed() ) { _sizeStorerSyncTracker.resetLastTime(); syncSizeInfo(false); } + } + + bool WiredTigerKVEngine::haveDropsQueued() const { boost::mutex::scoped_lock lk( _identToDropMutex ); return !_identToDrop.empty(); } |