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

Add SnapshotTooOld and SnapshotUnavailable exception

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

      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:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: