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

Deprecate use of gossip state for paxos electorate verification

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.x
    • None

    Description

      In C* 5.0 and earlier, paxos uses gossip state to verify the paxos electorate remains stable during a round.
      In 5.1, we mostly use the current epoch for this purpose, but some usage of gossip state has been left in place and should be removed.

      An Electorate is now constructed from ClusterMetadata and no longer relies on anything in gossip, so updating gossip in PaxosPrepare::onResponse is no longer necessary. Instead, in the case where the respondent has signalled a mismatch the requester should perform a metadata catchup to the appropriate epoch.

      Currently, this mismatch is communicated by the presence of a non-empty map of endpoint states, but this is no longer necessary as Paxos::verifyElectorate can provide the epoch of the placements used to construct its local electorate if it differs from the remote one. That epoch can then be included in the Permitted response instead of the gossip state. When handling the Permitted response, the paxos coordinator can use this epoch to determine whether it needs to call permittedOrTerminateIfElectorateMismatch.

      For now, we will need to include both the electorate epoch and gossip state in the Permitted response to ensure continuity during upgrades but eventually the gossip state can be removed from these messages.

      Attachments

        1. ci_summary.html
          43 kB
          Sam Tunnicliffe
        2. ci_summary-1.html
          77 kB
          Sam Tunnicliffe

        Issue Links

          Activity

            People

              samt Sam Tunnicliffe
              samt Sam Tunnicliffe
              Sam Tunnicliffe
              Benedict Elliott Smith, Marcus Eriksson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: