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

CollectionRoutingInfo could contain stale database information even after refresh

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 7.3.0-rc0, 8.0.0-rc0
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2024-03-04, CAR Team 2024-03-18, CAR Team 2024-04-01, CAR Team 2024-04-15, CAR Team 2024-04-29, CAR Team 2024-05-13

      CollectionRoutingInfo contains information about both the collection and the database. The "get.*CollectionRoutingInfoWithRefresh()" functions of the CatalogCache guarantees that the collection information contained in the returned CollectionRoutingInfo object are causal consistent  with respect to the latest config time known by the node.

      While this is true for collection information, it is not true for the database information contained in the object, namely database version and database primary shard.

      This is because those withRefresh functions only advance the time in store for the collection cache entry but not for the database.

      This means that it is not safe to use the database information stored in the CollectionRoutingInfo when executing in either Shard or DDL role.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: