Ensure that reshardCollection logs its commit within config.placementHistory with the right timestamp

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-12-08
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      reshard_collection_event.js is failing when running change streams in v2 version.

      The context:

      • 2 shards sharded cluster A and B
      • changeStream is opened over a collection C on shard A
      • collection C is resharded to shard B
      • change stream is observed and reshardCollection event is returned
      • a new change stream is reopened with reshardCollection event resumeToken
      • the second change stream fails to find the event with the matching resumeToken, because it opened the cursor directly on shard B, as this is the information that was reported by the placementHistory
      • instead, placement history should have reported the placement being shard A, then change stream would have noticed the event matching the resumeToken, the next event would have been NamespacePlacementChanged event, which when handled by the ShardTargeter would return shardB and cursors will be closed on shard A and opened on shard B

            Assignee:
            Paolo Polato
            Reporter:
            Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: