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

StaleConfig exceptions should not escape from the RouterRole loop

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Catalog and Routing
    • ALL
    • CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22
    • 107

      The current StaleConfig exceptions are a form of WriteConflictException which are a way for the ShardRole to indicate to the upstream RouterRole that it didn't route to the correct shard. By this definition, they should never escape the RouterRole loop, because there could be an upstream RouterRole loop which can incorrectly misinterpret the exception to mean it routed to the wrong place for one collection, while in fact the upstream router didn't even route to a ShardRole.

      An example of this would be a recursive tree of $lookups operating on views.

      In order to catch such exceptions wrongly propagated up the tree, the existing router role loop(s) have invariants here and here. Without this invariant, it is possible that the client of the router role loop (i.e., the lambda inside) makes a mistake and uses the routing info provided for namespace 1, but attaches it to namespace 2.

      Currently, it is possible that a certain combination of {{$lookup}}s operating on views triggers this invariant.

      This ticket is to introduce a different kind of StaleConfig exception which just indicates to the upstream router that it can retry and there is no action to be taken, such as refreshing.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: