Count command on mongoq handles TenantMigrationAborted

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: 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
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Mathis Bessa (Inactive)
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: