Make reshardCollection and analyzeShardKey retry internally when sampled documents do not provide enough cardinality to create chunks

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      reshardCollection and analyzeShardKey use the SamplingBasedSplitPolicy which uses $sample to sample documents. $sample is only pseudo-random and depending the number of documents sampled, and even for a shard key with good cardinality, it may fail to sample documents with sufficient cardinality to create the target number of chunks. For some cases, retrying may help so we should add a retry mechanism in those commands or in SamplingBasedSplitPolicy.

            Assignee:
            Unassigned
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: