range_deleter_server_status.js should use assert.soon to check the number of range deletion tasks

XMLWordPrintableJSON

    • Fully Compatible
    • v4.4
    • Sharding 2021-02-08
    • 18
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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;
      }); 

            Assignee:
            Marcos José Grillo Ramirez
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: