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

Make Strategy classes fail if asked to fulfil an impossible replication request

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7 beta 1
    • None
    • None

    Description

      I added to RSECT in CASSANDRA-1147,

      // TODO DSS is asked to provide a total of 6 replicas, but we never give it 6 endpoints.
      // thus we are testing undefined behavior, at best.

      This is easiest to cause in DSS but it can afflict other Strategies too.

      Let's update the ARS contract to state that calculateNaturalEndpoints (hence getNaturalEndpoints too) will throw IllegalStateException if more replicas are requested than the known endpoints (for DSS, this would apply on a per-DC basis) and amend the Strategy classes to check for this.

      Attachments

        1. trunk-1191.txt
          31 kB
          Matthew F. Dennis

        Issue Links

          Activity

            People

              mdennis Matthew F. Dennis
              jbellis Jonathan Ellis
              Matthew F. Dennis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: