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

Oplog fetcher on shard servers can send afterClusterTime reads without gossiping $clusterTime

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Cluster Scalability
    • ALL

      The oplog fetcher always appends afterClusterTime to the find commands it runs against the primary in a replica set. The task executor it uses does have the LogicalTimeMetadataHook attached, but the hook only attaches $clusterTime to requests if the LogicalTimeValidator is set, which it won't be before a shard server has initialized its sharding state. This allows afterClusterTime reads to be sent without $clusterTime, which I don't think is normally allowed (at least for clients).

      This may not be such a problem in practice though, because this is only before sharding initialization, and the fetcher only sends requests to the primary, using an afterClusterTime based off the opTimes it has already fetched, which I believe the primary should always have.

      If we decide to change this but still need to send afterClusterTime in every fetcher's find, we may be able to change the LogicalTimeMetadata hook to always send $clusterTime even when the validator isn't enabled, since we don't authenticate times for __system connections anyway, like those between replica set members.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: