Improve ChunkManager API to prevent misuse of unsafe methods when at point-in-time

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • 3
    • None
    • 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:
            Unassigned
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: