summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2022-11-23 21:11:13 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-23 22:26:10 +0000
commit71c42004e0e094a3b6efb3352f516af2b76eda3f (patch)
tree00023950db537cdb65120c5b74425bc48edd6129
parent141ff826fd18ccbb1f93cee13bcc1a6a2f7a85da (diff)
downloadmongo-71c42004e0e094a3b6efb3352f516af2b76eda3f.tar.gz
SERVER-71122 Get rid of the `WaitForCleanCorrectEvenAfterClearFollowedBySetFilteringMetadata` unit test
-rw-r--r--src/mongo/db/s/collection_sharding_runtime_test.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mongo/db/s/collection_sharding_runtime_test.cpp b/src/mongo/db/s/collection_sharding_runtime_test.cpp
index 7e6be38d544..716527cf6d9 100644
--- a/src/mongo/db/s/collection_sharding_runtime_test.cpp
+++ b/src/mongo/db/s/collection_sharding_runtime_test.cpp
@@ -556,44 +556,6 @@ TEST_F(CollectionShardingRuntimeWithRangeDeleterTest,
ASSERT(cleanupComplete.isReady());
}
-TEST_F(CollectionShardingRuntimeWithRangeDeleterTest,
- WaitForCleanCorrectEvenAfterClearFollowedBySetFilteringMetadata) {
- globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::alwaysOn);
- ScopeGuard resetFailPoint(
- [=] { globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::off); });
-
- OperationContext* opCtx = operationContext();
- auto metadata = makeShardedMetadata(opCtx, uuid());
- csr()->setFilteringMetadata(opCtx, metadata);
- const ChunkRange range = ChunkRange(BSON(kShardKey << MINKEY), BSON(kShardKey << MAXKEY));
- const auto task = createRangeDeletionTask(opCtx, kTestNss, uuid(), range, 0);
-
- // Schedule range deletion that will hang due to `suspendRangeDeletion` failpoint
- auto cleanupComplete = registerAndCreatePersistentTask(
- opCtx, task, SemiFuture<void>::makeReady() /* waitForActiveQueries */);
-
- // Clear and set again filtering metadata
- csr()->clearFilteringMetadata(opCtx);
- csr()->setFilteringMetadata(opCtx, metadata);
-
- auto waitForCleanUp = [&](Date_t timeout) {
- return CollectionShardingRuntime::waitForClean(opCtx, kTestNss, uuid(), range, timeout);
- };
-
- // Check that the hanging range deletion is still tracked even following a clear of the metadata
- auto status = waitForCleanUp(Date_t::now() + Milliseconds(100));
- ASSERT_NOT_OK(status);
- ASSERT(!cleanupComplete.isReady());
-
- globalFailPointRegistry().find("suspendRangeDeletion")->setMode(FailPoint::off);
- resetFailPoint.dismiss();
-
- // Check that the range deletion is not tracked anymore after it succeeds
- status = waitForCleanUp(Date_t::max());
- ASSERT_OK(status);
- ASSERT(cleanupComplete.isReady());
-}
-
class CollectionShardingRuntimeWithCatalogTest
: public CollectionShardingRuntimeWithRangeDeleterTest {
public: