summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2015-02-11 16:38:59 -0500
committerRandolph Tan <randolph@10gen.com>2015-02-11 18:04:14 -0500
commitc87f1eb7dff11169f037bb0bdd5b48e1b23d70b1 (patch)
tree66f8a2ab945c2c52b50e2b2be9d3af2f99e7ce2d
parent295cb7943e21a22f9f3a95006de21b07b254afd2 (diff)
downloadmongo-c87f1eb7dff11169f037bb0bdd5b48e1b23d70b1.tar.gz
SERVER-17246 Invariant failure when dropping collection during chunk split
-rw-r--r--src/mongo/s/d_split.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/s/d_split.cpp b/src/mongo/s/d_split.cpp
index fb6a842c566..1cb2504ab8c 100644
--- a/src/mongo/s/d_split.cpp
+++ b/src/mongo/s/d_split.cpp
@@ -847,7 +847,11 @@ namespace mongo {
{
AutoGetCollectionForRead ctx(txn, ns);
Collection* collection = ctx.getCollection();
- invariant(collection);
+ if (!collection) {
+ warning() << "will not perform top-chunk checking since " << ns
+ << " does not exist after splitting";
+ return true;
+ }
// Allow multiKey based on the invariant that shard keys must be
// single-valued. Therefore, any multi-key index prefixed by shard