Improve ChunkManager API to prevent unsafe method calls on point-in-time instances

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-11-10, CAR Team 2025-11-24, CAR Team 2025-12-08, CAR Team 2025-12-22
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ChunkManager's API exposes several methods that are not safe to be called when that ChunkManager was constructed https://github.com/mongodb/mongo/blob/4b43a2f98e9bb481d71f57f9773f7c0415c1fdb9/src/mongo/s/chunk_manager.h#L625. Examples of unsafe methods are getNextChunkOnShard(), getAllShardIds() and getNShardsOwningChunks(). SERVER-87197 added tripwire assertions to catch unsafe usages, but a more permanent improvement is to change the ChunkManager API so that such unsafe access are not even possible programatically.

            Assignee:
            Igor Praznik
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: