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

Count command on mongoq handles TenantMigrationAborted

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Server Serverless 2021-10-11, Server Serverless 2021-10-18, Server Serverless 2021-10-25, Server Serverless 2021-11-01, Server Serverless 2021-11-15

    Description

      ClusterCountCmd::run uses scatterGatherVersionedTargetByRoutingTable, which throws on routing errors. The routing error exceptions are caught in mongos's/mongoq's service entry point, where mongos/mongoq marks the appropriate routing cache entry as stale and retries the command by calling that function recursively until retries are exhausted.

      This ticket should:

      • Update scatterGatherVersionedTargetByRoutingTable to also throw on TenantMigrationAborted
      • Update mongos's/mongoq's service entry point to recursively call run() on TenantMigrationAborted
      • Add a test that mongos/mongoq retries the count command internally on TenantMigrationAborted.
        • The test should be similar to the testRejectBlockedWritesAfterMigrationAborted test case in that it should:
          • set the pauseTenantMigrationBeforeLeavingBlockingState and abortTenantMigrationBeforeLeavingBlockingState failpoints on the replica set primary
          • start a tenant migration against the replica set primary
          • wait for the first failpoint to be hit
          • run the count command
          • wait for the replica set primary to report that it is blocking a read
          • disable the first failpoint to allow the count command to continue
          • assert that the count command worked
        • However, the test should run the count command against mongos/mongoq instead of against the replica set primary.

      Attachments

        Activity

          People

            mathis.bessa@mongodb.com Mathis Bessa
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: