diff options
author | Eric Milkie <milkie@10gen.com> | 2014-10-20 14:05:02 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-10-27 09:17:54 -0400 |
commit | 52bef37842c1b78e3378a5a931ba8c428aad8e6a (patch) | |
tree | 17b540ddb78beb8ac777701a43ce76759c9546bb /src/mongo/db/index_rebuilder.cpp | |
parent | ee2303939ee8cd88a5ff2ba78c0a67b69282891e (diff) | |
download | mongo-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.cpp | 11 |
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; |