Evaluate whether stale chunk cleanup during refineShardKey is needed once merge/split are authoritative

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In commitRefineShardKeyLocally (commit_collection_metadata_locally.cpp), after updating collection and chunk metadata locally mirroring a snapshot of the config server, we delete stale chunks from config.shard.catalog.chunks whose shard key bounds no longer match the refined key pattern.

      Specifically, we delete any chunk document whose min field has a different number of fields than the new shard key pattern.

      This cleanup exists because the durable shard catalog may hold an out-of-date view of owned chunk ranges because of split and merge.

      After split and merge are authoritative, we should evaluate if this leftovers deletion is still needed.

            Assignee:
            Unassigned
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: