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

Noop write for afterClusterTime/atClusterTime needs to target primary

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2021-02-08

      Description

      In waitForReadConcernImpl we perform a makeNoopWriteIfNeeded to bump up the clusterTime by running a appendOplogNote command

      The command is run against the Shard object obtained here. If the waitForReadConcernImpl is running on a configsvr secondary, then Grid::get(opCtx)>shardRegistry()>getConfigShard() returns a ShardLocal instance. Then the appendOplogNote would be ran using the DBDirectClient agains the local node (secondary), which will fail.

      We need to ensure that the appendOplogNote is ran against the replica set primary.

      We could use ReplicationCoordinator::runCmdOnPrimaryAndAwaitResponse

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jordi.serra-torrens Jordi Serra Torrens
              Reporter:
              jordi.serra-torrens Jordi Serra Torrens
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: