diff options
author | Silvia Surroca <silvia.surroca@mongodb.com> | 2022-09-21 15:00:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-21 15:45:13 +0000 |
commit | 1d61d0b76ec6b6c130d6d2433d56df5524a7a82c (patch) | |
tree | dded2d54c09668cd55d4630bb0371903899d9391 /src/mongo/db/s/range_deleter_service_test.h | |
parent | 40fbb65d3607bc78429fa19ad77f7d962a218056 (diff) | |
download | mongo-1d61d0b76ec6b6c130d6d2433d56df5524a7a82c.tar.gz |
SERVER-69768 Include key pattern in range deletion task documents
Diffstat (limited to 'src/mongo/db/s/range_deleter_service_test.h')
-rw-r--r-- | src/mongo/db/s/range_deleter_service_test.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/s/range_deleter_service_test.h b/src/mongo/db/s/range_deleter_service_test.h index 7c689178ab1..cc44ac03225 100644 --- a/src/mongo/db/s/range_deleter_service_test.h +++ b/src/mongo/db/s/range_deleter_service_test.h @@ -75,7 +75,7 @@ public: inline static const BSONObj kShardKeyPattern = BSON(kShardKey << 1); private: - void _setFilteringMetadataWithUUID(OperationContext* opCtx, const UUID& uuid); + void _setFilteringMetadataByUUID(OperationContext* opCtx, const UUID& uuid); // Scoped objects RAIIServerParameterControllerForTest enableFeatureFlag{"featureFlagRangeDeleterService", true}; @@ -87,14 +87,16 @@ RangeDeletionTask createRangeDeletionTask(const UUID& collectionUUID, const BSONObj& min, const BSONObj& max, CleanWhenEnum whenToClean = CleanWhenEnum::kNow, - bool pending = true); + bool pending = true, + boost::optional<KeyPattern> keyPattern = boost::none); std::shared_ptr<RangeDeletionWithOngoingQueries> createRangeDeletionTaskWithOngoingQueries( const UUID& collectionUUID, const BSONObj& min, const BSONObj& max, CleanWhenEnum whenToClean = CleanWhenEnum::kNow, - bool pending = true); + bool pending = true, + boost::optional<KeyPattern> keyPattern = boost::none); SharedSemiFuture<void> registerAndCreatePersistentTask( OperationContext* opCtx, @@ -108,6 +110,9 @@ void verifyRangeDeletionTasks(OperationContext* opCtx, UUID uuidColl, std::vector<ChunkRange> expectedChunkRanges); +/* Unset any filtering metadata associated with the specified collection */ +void _clearFilteringMetadataByUUID(OperationContext* opCtx, const UUID& uuid); + // CRUD operation over `config.rangeDeletions` void insertRangeDeletionTaskDocument(OperationContext* opCtx, const RangeDeletionTask& rdt); void updatePendingField(OperationContext* opCtx, UUID rdtId, bool pending); |