Fix legacy timeseries namespace translation in findAndModify explain command

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.3.0-rc0, 8.2.0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • v8.2
    • CAR Team 2025-11-24
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The namespace translation for legacy timeseries collection in the findAndModify command is done in two places:

      In the first case we perform the translation whenever we are targeting a legacy timeseries collections:

      isTrackedTimeseries && !cm.isNewTimeseriesWithoutView()
      

      On the other hand, for the second case we are not performing the translation in case the operation is a rawData operation received over the main timeseries namespace:

      isTimeseriesLogicalRequest && !cri.getChunkManager().isNewTimeseriesWithoutView()
      

      The second case is wrong, and in fact we should perform both translation using the first condition.

      The result is that we are sending a command on the main timeseries nss (e.g. `myColl`) along with a ShardVersion associated to the timeseries buckets (e.g. `system.buckets.myColl`). This mismatch will cause the shard version protocol to fail and potentially never converge, making a mongos impossible to serve queries for that specific collection.

      As part of this ticket, we should make sure we have enough coverage for rawData explain over a timeseries sharded collection.

            Assignee:
            Tommaso Tocci
            Reporter:
            Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: