Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14862

Fix incorrect sorting of replicas in SimpleStrategy.calculateNaturalReplicas

    XMLWordPrintableJSON

    Details

    • Severity:
      Low

      Description

      The sorting of natural replicas in SimpleStrategy.calculateNaturalReplicas committed as part of e645b917 for CASSANDRA-14726 has broken the TestTopology.test_size_estimates_multidc dtest (example run) as the "primary" ranges have now changed. I'm actually surprised only a single dtest fails as I believe we've broken multi-dc SimpleStrategy reasonably badly.

      In particular the SimpleStrategy.calculateNaturalReplicas method cannot sort the endpoints by datacenter first. It has to leave them in the order that it found them else change which replicas are considered "primary" replicas (which mostly impacts repair and size estimates and the such).

      I have written a regression unit test for the SimpleStrategy and am running it through circleci now. Will post the patch shortly.

        Attachments

          Activity

            People

            • Assignee:
              jolynch Joey Lynch
              Reporter:
              jolynch Joey Lynch
              Authors:
              Joey Lynch
              Reviewers:
              Benedict Elliott Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: