summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_rebuilder.cpp
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-10-20 14:05:02 -0400
committerEric Milkie <milkie@10gen.com>2014-10-27 09:17:54 -0400
commit52bef37842c1b78e3378a5a931ba8c428aad8e6a (patch)
tree17b540ddb78beb8ac777701a43ce76759c9546bb /src/mongo/db/index_rebuilder.cpp
parentee2303939ee8cd88a5ff2ba78c0a67b69282891e (diff)
downloadmongo-52bef37842c1b78e3378a5a931ba8c428aad8e6a.tar.gz
SERVER-15729 make index rebuilder error message more clear
Diffstat (limited to 'src/mongo/db/index_rebuilder.cpp')
-rw-r--r--src/mongo/db/index_rebuilder.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/index_rebuilder.cpp b/src/mongo/db/index_rebuilder.cpp
index 58bb3b98501..5414a174202 100644
--- a/src/mongo/db/index_rebuilder.cpp
+++ b/src/mongo/db/index_rebuilder.cpp
@@ -124,6 +124,14 @@ namespace {
indexer.commit();
wunit.commit();
}
+ catch (const DBException& e) {
+ error() << "Index rebuilding did not complete: " << e.toString();
+ log() << "note: restart the server with --noIndexBuildRetry to skip index rebuilds";
+ // If anything went wrong, leave the indexes partially built so that we pick them up
+ // again on restart.
+ indexer.abortWithoutCleanup();
+ fassertFailedNoTrace(26100);
+ }
catch (...) {
// If anything went wrong, leave the indexes partially built so that we pick them up
// again on restart.
@@ -155,8 +163,7 @@ namespace {
checkNS(txn, collNames);
}
catch (const DBException& e) {
- error() << "Index rebuilding did not complete: " << e.toString();
- log() << "note: restart the server with --noIndexBuildRetry to skip index rebuilds";
+ error() << "Index verification did not complete: " << e.toString();
fassertFailedNoTrace(18643);
}
LOG(1) << "checking complete" << endl;