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

Make sure timeseries inserts perform a ShardVersion check before inspecting the existence of the buckets collection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.0.0-rc0, 7.3.0, 8.1.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.0, v6.0
    • Hide

      Repro attached

      Show
      Repro attached
    • CAR Team 2024-07-08, CAR Team 2024-07-22, CAR Team 2024-08-05, CAR Team 2024-08-19, CAR Team 2024-09-02
    • 0

      The timeseries insert path checks for the presence of the bucket collection before acquiring the collection and checking the shard version.*
      This can lead to a NamespaceNotFound error being thrown in cases where a StaleConfig would be expected instead.
      In general, the issue could occur for any combination of operations that transfer data of a collection from shard A to shard B, and drop the collection on the donor.

      For example, if we started an insert into a timeseries collection and a moveCollection happened in the meantime, the bucket collection may no longer exist when check for its presence.
      Therefore, we will return NamespaceNotFound at that check, rather than throwing StaleConfig at the later check.

      *[This is because the timeseries bucket options are needed for inserting into the in-memory bucket catalog, but the collection locks are not needed at this point, because nothing persisted is being done yet.]

            Assignee:
            robert.sander@mongodb.com Robert Sander
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: