Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53827

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

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

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: