-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08
Create a RangeDeleterServiceObserver implementing the OpObserver inteface to observe CRUD operations happening on range deletion task documents contained in the config.rangeDeletions namespace.
The observer must be set-up only on shard nodes conditionally to the value of the feature flag.
The following behaviors are expected to be implemented:
- On insert :
- If the pending field is set to true --> no-op
- If the pending field is not present or set to false --> register the range deletion task on the service.
- On update:
- If, as part of the update, the pending field is unset or set to false --> register the range deletion task on the service.
- On delete:
- Deregister the range deletion task from the service
Development strategy
In case this ticket gets picked up before the completion of SERVER-67636, a first version of the observer can enclose a RangeDeleterService instance. The retrieval of the instance from the service context can be implemented as a followup.
Testing strategy
- Unit tests can be added to check that the range deleter service state gets properly updated in reaction to the targeted CRUD operations.
- Since feature flags are disabled in unit tests (if not explicitly enabled on the binary), depending on how the test is setup it may be needed to enable the range deleter service feature flag by using a RAIIServerParameterControllerForTest.
- causes
-
SERVER-77513 Range deletion document removal commit must trigger in-memory state update
- Closed