EPEngine::destroy: explain why stats are snapshotted 66/76466/3
authorDave Rigby <daver@couchbase.com>
Fri, 7 Apr 2017 08:21:44 +0000 (09:21 +0100)
committerDave Rigby <daver@couchbase.com>
Fri, 7 Apr 2017 17:40:25 +0000 (17:40 +0000)
Change-Id: Iddf82827efc7810c2fb6abd459d31e777fcc7392
Reviewed-on: http://review.couchbase.org/76466
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
src/ep_engine.cc

index 6e498ae..500722c 100644 (file)
@@ -2049,6 +2049,10 @@ void EventuallyPersistentEngine::destroy(bool force) {
     stats.forceShutdown = force;
     stats.isShutdown = true;
 
+    // Perform a snapshot of the stats before shutting down so we can persist
+    // the type of shutdown (stats.forceShutdown), and consequently on the
+    // next warmup can determine is there was a clean shutdown - see
+    // Warmup::cleanShutdown
     if (kvBucket) {
         kvBucket->snapshotStats();
     }