diff options
author | Jordi Olivares Provencio <jordi.olivares-provencio@mongodb.com> | 2022-10-17 14:28:12 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-17 15:43:57 +0000 |
commit | 7bc2bd798b3723602353bfdabef7a99bf7f26927 (patch) | |
tree | effcdda4b3abbb95955fd3f982fb91db837dcb3e | |
parent | fd993b1351cd1676efb343e24287d7a1f9295ace (diff) | |
download | mongo-7bc2bd798b3723602353bfdabef7a99bf7f26927.tar.gz |
SERVER-70036 Deprioritise range deletion when overloaded
-rw-r--r-- | src/mongo/db/s/range_deletion_util.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/s/range_deletion_util.cpp b/src/mongo/db/s/range_deletion_util.cpp index aeda613b823..3a8b512ddba 100644 --- a/src/mongo/db/s/range_deletion_util.cpp +++ b/src/mongo/db/s/range_deletion_util.cpp @@ -36,6 +36,7 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/client.h" #include "mongo/db/concurrency/exception_util.h" +#include "mongo/db/concurrency/lock_state.h" #include "mongo/db/dbhelpers.h" #include "mongo/db/exec/delete_stage.h" #include "mongo/db/exec/working_set_common.h" @@ -321,6 +322,8 @@ Status deleteRangeInBatches(OperationContext* opCtx, const ChunkRange& range) { suspendRangeDeletion.pauseWhileSet(opCtx); + SetTicketAquisitionPriorityForLock priority(opCtx, AdmissionContext::Priority::kLow); + bool allDocsRemoved = false; // Delete all batches in this range unless a stepdown error occurs. Do not yield the // executor to ensure that this range is fully deleted before another range is |