diff --git a/src/mongo/s/chunk_diff.cpp b/src/mongo/s/chunk_diff.cpp index a832b72..5e33d67 100644 --- a/src/mongo/s/chunk_diff.cpp +++ b/src/mongo/s/chunk_diff.cpp @@ -36,9 +36,12 @@ #include "mongo/s/chunk_version.h" #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" +#include "mongo/util/fail_point_service.h" namespace mongo { +MONGO_FP_DECLARE(invalidChunkDiff); + template ConfigDiffTracker::ConfigDiffTracker() { _ns.clear(); @@ -104,6 +107,10 @@ int ConfigDiffTracker::calculateConfigDiff(OperationContext* txn, const std::vector& chunks) { _assertAttached(); + if (MONGO_FAIL_POINT(invalidChunkDiff)) { + return -1; + } + // Apply the chunk changes to the ranges and versions // // Overall idea here is to work in two steps :