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

Potential double-execution of write statements when ShardCannotRefreshDueToLocksHeld is thrown

    • Sharding EMEA
    • Fully Compatible
    • ALL
    • v7.2, v7.1, v7.0, v6.0, v5.0
    • Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27
    • 2

      Write commands currently throw ShardCannotRefreshDueToLocksHeld as a top-level command error (i.e. ok: 0 with ShardCannotRefreshDueToLocksHeld). Additionally, mongos/shard may retry a command upon ShardCannotRefreshDueToLocksHeld error. And this is problematic if refreshing the cache fails with ShardCannotRefreshDueToLocksHeld in between write statements (e.g. flushRouterConfig is a user-facing command which could cause the CatalogCache to become stale for the temporary resharding collection). This is because some write statements may have been done before ShardCannotRefreshDueToLocksHeld was thrown and retrying the entire command may cause double execution for those write statements.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: