-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
v4.4
-
Sharding 2021-02-08
-
18
The moveChunk command returns before the range deletion is added to the _rangesScheduledForDeletion list because than happens asynchronously when it's set not to wait for delete.
In the range_deleter_server_status.js, we are checking the number of range deletions tasks right after moveChunk returns, so the task may not have been added yet to the list, and thus not reflected in the serverStatus.
We should use an assert.soon instead:
assert.soon(() => { let serverStatusRes = shardDB.runCommand({serverStatus: 1}); return 3 == serverStatusRes.shardingStatistics.rangeDeleterTasks; });