MB-17024: Add more logs during bucket deletion 96/60596/2
authorSriram Ganesan <sriram@couchbase.com>
Sat, 27 Feb 2016 02:30:02 +0000 (18:30 -0800)
committerSriram Ganesan <sriram@couchbase.com>
Tue, 1 Mar 2016 17:29:46 +0000 (17:29 +0000)
Add more logs and change certain logs to WARNING level while these
tasks are stopped during bucket deletion

Change-Id: Ia2ada9d8525cec4c3e50ed087d2d052a05663873
Reviewed-on: http://review.couchbase.org/60596
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
src/ep.cc
src/executorpool.cc
src/executorthread.cc

index ff0b16e..75ea267 100644 (file)
--- a/src/ep.cc
+++ b/src/ep.cc
@@ -431,6 +431,8 @@ bool EventuallyPersistentStore::startFlusher() {
 void EventuallyPersistentStore::stopFlusher() {
     for (uint16_t i = 0; i < vbMap.numShards; i++) {
         Flusher *flusher = vbMap.shards[i]->getFlusher();
+        LOG(EXTENSION_LOG_WARNING, "Attempting to stop the flusher for "
+            "shard:%" PRIu16, i);
         bool rv = flusher->stop(stats.forceShutdown);
         if (rv && !stats.forceShutdown) {
             flusher->wait();
@@ -479,7 +481,7 @@ bool EventuallyPersistentStore::startBgFetcher() {
         BgFetcher *bgfetcher = vbMap.shards[i]->getBgFetcher();
         if (bgfetcher == NULL) {
             LOG(EXTENSION_LOG_WARNING,
-                "Falied to start bg fetcher for shard %d", i);
+                "Failed to start bg fetcher for shard %d", i);
             return false;
         }
         bgfetcher->start();
@@ -495,7 +497,7 @@ void EventuallyPersistentStore::stopBgFetcher() {
                 "Shutting down engine while there are still pending data "
                 "read for shard %d from database storage", i);
         }
-        LOG(EXTENSION_LOG_INFO, "Stopping bg fetcher for underlying storage");
+        LOG(EXTENSION_LOG_WARNING, "Stopping bg fetcher for shard:%" PRIu16, i);
         bgfetcher->stop();
     }
 }
index 26a61e2..64c993c 100644 (file)
@@ -508,7 +508,7 @@ bool ExecutorPool::_stopTaskGroup(EventuallyPersistentEngine *e,
     std::map<size_t, TaskQpair>::iterator itr;
 
     LockHolder lh(tMutex);
-    LOG(EXTENSION_LOG_DEBUG, "Stopping %d type tasks in bucket %s", taskType,
+    LOG(EXTENSION_LOG_WARNING, "Stopping %d type tasks in bucket %s", taskType,
             e->getName());
     do {
         ExTask task;
@@ -518,7 +518,7 @@ bool ExecutorPool::_stopTaskGroup(EventuallyPersistentEngine *e,
             TaskQueue *q = itr->second.second;
             if (task->getEngine() == e &&
                 (taskType == NO_TASK_TYPE || q->queueType == taskType)) {
-                LOG(EXTENSION_LOG_DEBUG, "Stopping Task id %d %s ",
+                LOG(EXTENSION_LOG_WARNING, "Stopping Task id %d %s ",
                         task->getId(), task->getDescription().c_str());
                 // If force flag is set during shutdown, cancel all tasks
                 // without considering the blockShutdown status of the task.
index 0164b07..7d629bd 100644 (file)
@@ -66,11 +66,11 @@ void ExecutorThread::stop(bool wait) {
     }
     state = EXECUTOR_SHUTDOWN;
     if (!wait) {
-        LOG(EXTENSION_LOG_INFO, "%s: Stopping", name.c_str());
+        LOG(EXTENSION_LOG_WARNING, "%s: Stopping", name.c_str());
         return;
     }
     cb_join_thread(thread);
-    LOG(EXTENSION_LOG_INFO, "%s: Stopped", name.c_str());
+    LOG(EXTENSION_LOG_WARNING, "%s: Stopped", name.c_str());
 }
 
 void ExecutorThread::run() {