ExportXMLWordPrintableJSON

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

      Motivation
      The recipient’s transition validators should reject a donor list that names a shard twice, as the donor and coordinator validators already reject malformed input of their own. The value is low: the coordinator’s pre-transition check already rejects duplicate donor and recipient shards (resharding_coordinator_transition_validation.cpp:58), and the recipient’s donor list is fixed when the operation is created (the immutable-fields rule rejects any change). The check would only catch a coordinator bug or a corrupted document.

      This ticket was filed as “reject negative cloning totals and duplicate donors”. Negative totals are done: hasCloningTotalsWhenVerifying rejects them (shipped with SERVER-139682). Only duplicate donors remain.

      Context
      hasDonorShards currently checks only that the donor list is not empty.

      Proposed approach

      Make hasDonorShards also reject duplicate shard ids, naming the id in the message, with one unit test and a mutation check.
      Do it in the next validator PR (for example SERVER-139684) rather than its own, or close this ticket as Won’t Do if reviewers prefer.

      Acceptance criteria

      • A duplicated donor id fails exactly hasDonorShards on every edge that evaluates it, and the message contains the id.
      • Removing the new condition fails exactly one test.
      • The recipient, donor and coordinator validation unit tests pass.

      Note: Ensure the negative-totals half has been implemented: hasCloningTotalsWhenVerifying rejects negative values in the change for SERVER-139682. If the SERVER-139682 change does not land as is, the negative-totals rule has to be covered as well (either as part of this ticket or a separate one).

            Assignee:
            Unassigned
            Reporter:
            Nandini Bhartiya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: