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

computeAtClusterTimeForOneShard should return the latest clusterTime if there is no cached lastCommittedOpTime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.2
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2018-08-13
    • Linked BF Score:
      12

      Description

      computeAtClusterTimeForOneShard is used to select an atClusterTime for requests with snapshot level readConcern targeting a single shard (typically an unsharded collection). Currently it always returns the latest cached lastCommittedOpTime for the targeted shard from the ShardRegistry. The hook that updates this value does not run on all connections though, so it is possible for this value to be null, in which case atClusterTime would be a null logical time, which is not allowed and triggers an invariant.

      Instead, if there is no cached value, the function should return the latest in-memory cluster time from the logical clock.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: