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

Shard-local re-execution of a command might bubble up a misleading StaleConfig exception to the router

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2024-02-05, CAR Team 2024-02-19
    • 0
    • 2

    Description

      In some cases, when a shard realizes that the filtering metadata is not properly installed, it fails the current execution of the command, forces a refresh and then it re-executes the original command. If that refresh ends up failing, the error that is bubbled up to the router is the StaleConfig one and not the new one we got from the refresh. This behavior for in general makes a lot of sense: the router will retry the whole command and then the shard will execute the same steps as before, hoping that the refresh won't fail.

      Bubbling up the StaleConfig instead of the proper error might be problematic in some cases, though: imagine that we get a NotPrimary exception. If we bubble up a StaleConfig exception the router won't realize that the primary has changed, potentially leading to a re-execution of the command with exactly the same consequences until we  exhaust the retries.

      Attachments

        Activity

          People

            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: