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

Shard does not correctly check the ShardVersion received for timeseries collections

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.1.0, 6.0.0, 7.0.0, 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2024-12-23, CAR Team 2025-01-06
    • 200
    • 3

      When a router is aware of a stale version of a collection (which is not a timeseries), and the collection has now been re-created into a timeseries, the shard processing the request may bypass the shard version protocol. As a result, the shard might attempt to read from the old version of the collection rather than from the system.buckets collection.

      Consider the following scenario:

      1. Create a database with the db primary shard being shard0.
      2. Create a sharded collection with chunks only in shard1.
      3. Make both RouterA and RouterB acknowledge in their routing information that the collection is located in shard1.
      4. Recreate the same sharded collection as a timeseries under RouterA, with chunks only in shard1.
      5. Insert some data into the timeseries collection using RouterA.
      6. RouterB attempts to read from the collection using stale routing information (from the previous incarnation when the collection was not a timeseries). As a result, the shard ignores the shard version protocol and fails to read the documents that were previously inserted.

      This scenario illustrates how a router can lead to missed reads in a timeseries collection.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: