Add SnapshotTooOld and SnapshotUnavailable exception

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Original Ticket:

      The SnapshotTooOld be returned from individual shards. This task adds a
      StaleSnapshotError error class to error_codes.err that includes ["StaleConfig", "StaleShardVersion", "StaleEpoch", "SnapshotUnavailable", "SnapshotTooOld"] errors
      the purpose or this error class is to restart targeting if the snapshot is unavailable or shard version is stale.

      As an alternative approach use only ["SnapshotUnavailable", "SnapshotTooOld"] - that will allow to make implementation different handling for SnapshotErrors.


      Summary:

      Add a new error codes and a new error class to catch snapshot errors that require retrying establishing a global snapshot. This includes: ["SnapshotTooOld", "SnapshotUnavailable"]. "SnapshotTooOld" has already been added as part of Local Snapshot Reads, so only "SnapshotUnavailable" needs to be added.

      Details:

      In src/mongo/base/error_codes.err:

      error_code("SnapshotTooOld", <number>)
      error_code("SnapshotUnavailable", <number>)
      
      ...
      
      error_class("SnapshotTargetingError", ["SnapshotTooOld", "SnapshotUnavailable"])
      

      POC: https://mongodbcr.appspot.com/184550001

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: