diff options
author | Erwin Pe <erwin.pe@mongodb.com> | 2022-05-17 02:13:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-17 03:02:21 +0000 |
commit | 86483f603c2de7ee5ec5f013798d38c770e35859 (patch) | |
tree | b08238d6b62a7d2d112f03783fae90896013e3c8 | |
parent | 7ed364e8922e42822c2d1bc2e41a66159eb7ddcb (diff) | |
download | mongo-86483f603c2de7ee5ec5f013798d38c770e35859.tar.gz |
SERVER-65999 Fix the sharding test for two simultaneous compacts
(cherry picked from commit a86cebf1f3e71d70d83de592128ada08493321be)
-rw-r--r-- | src/mongo/db/commands/fle2_compact.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/commands/fle2_compact.cpp b/src/mongo/db/commands/fle2_compact.cpp index 03fc6c7b0a9..18f1f05cf98 100644 --- a/src/mongo/db/commands/fle2_compact.cpp +++ b/src/mongo/db/commands/fle2_compact.cpp @@ -43,6 +43,10 @@ #include "mongo/platform/mutex.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + +MONGO_FAIL_POINT_DEFINE(fleCompactFailBeforeECOCRead); MONGO_FAIL_POINT_DEFINE(fleCompactHangBeforeESCPlaceholderInsert); MONGO_FAIL_POINT_DEFINE(fleCompactHangAfterESCPlaceholderInsert); MONGO_FAIL_POINT_DEFINE(fleCompactHangBeforeECCPlaceholderInsert); @@ -617,6 +621,10 @@ CompactStats processFLECompact(OperationContext* opCtx, auto eccStats = std::make_shared<ECStats>(); auto c = std::make_shared<stdx::unordered_set<ECOCCompactionDocument>>(); + if (MONGO_unlikely(fleCompactFailBeforeECOCRead.shouldFail())) { + uasserted(6599901, "Failed compact due to fleCompactFailBeforeECOCRead fail point"); + } + // Read the ECOC documents in a transaction { std::shared_ptr<txn_api::SyncTransactionWithRetries> trun = getTxn(opCtx); |