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

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      Sharding 2021-02-08
    • Linked BF Score:
      18

      Description

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: