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

Causal consistency is not guaranteed in logical session cache refresh during test startup

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.0.0, 8.1.0-alpha2
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-02-17, CAR Team 2025-03-03
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the sharded cluster python test fixture, we call refreshLogicalSessionCacheNow on the config server to ensure the config.system.sessions collection exists and is sharded. After this, we call refreshLogicalSessionCacheNow on each shard. The shard version of this command will fail if config.system.sessions is found to be unsharded. Because this command is run directly against the shard primary, we have no guarantee of causal consistency between the shardCollection on the config server and the refresh on the shard server, though, which can cause failures in the test setup if the refresh reads from a config server secondary which is behind the primary and so does not know the sessions collection has been sharded yet.

      We should change the test setup either to ensure causal consistency here or to add retries upon failure of the refreshLogicalSessionCacheNow function when run on the shards. 

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None