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

The $_internalOwningShard expression should verify that the cached CollectionRoutingInfo has an initialised routing table before consuming it

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2024-03-18

      The execution of the $_internalOwningShard aggregation expression requires the fetching of up-to-date routing information in a context that does not allow to wait for the completion of an inflight cache refresh.
      Such a logic should have to deal with situations where the returned CollectionRoutingInfo is stale or absent (this may happen in case $_internalOwningShard gets invoked right after the targeted collection gets sharded, which only triggers an asynchronous refresh of the routing info), but currently only the first condition is checked - and a tassert is instead hit when the latter one materialises.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            paolo.polato@mongodb.com Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: