Repository: cassandra Updated Branches: refs/heads/trunk 255242237 -> 717c10837
Fix assertions in PaxosState and PrepareResponse after TableMetadata was made immutable Patch by Michael Burman; reviewed by Mick Semb Wever for CASSANDRA-14356 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/717c1083 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/717c1083 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/717c1083 Branch: refs/heads/trunk Commit: 717c108374a56897d10fcad41fe82b43e2192648 Parents: 2552422 Author: Mick Semb Wever <m...@apache.org> Authored: Sun Jun 17 14:29:00 2018 +1000 Committer: Mick Semb Wever <m...@apache.org> Committed: Mon Jun 18 20:03:27 2018 +1000 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/paxos/PaxosState.java | 2 +- src/java/org/apache/cassandra/service/paxos/PrepareResponse.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/717c1083/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 4ea32c9..fd236a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.0 + * Fix assertions in LWTs after TableMetadata was made immutable (CASSANDRA-14356) * Abort compactions quicker (CASSANDRA-14397) * Support light-weight transactions in cassandra-stress (CASSANDRA-13529) * Make AsyncOneResponse use the correct timeout (CASSANDRA-14509) http://git-wip-us.apache.org/repos/asf/cassandra/blob/717c1083/src/java/org/apache/cassandra/service/paxos/PaxosState.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/paxos/PaxosState.java b/src/java/org/apache/cassandra/service/paxos/PaxosState.java index 7d59374..6e02435 100644 --- a/src/java/org/apache/cassandra/service/paxos/PaxosState.java +++ b/src/java/org/apache/cassandra/service/paxos/PaxosState.java @@ -46,7 +46,7 @@ public class PaxosState public PaxosState(Commit promised, Commit accepted, Commit mostRecentCommit) { assert promised.update.partitionKey().equals(accepted.update.partitionKey()) && accepted.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); - assert promised.update.metadata() == accepted.update.metadata() && accepted.update.metadata() == mostRecentCommit.update.metadata(); + assert promised.update.metadata().id.equals(accepted.update.metadata().id) && accepted.update.metadata().id.equals(mostRecentCommit.update.metadata().id); this.promised = promised; this.accepted = accepted; http://git-wip-us.apache.org/repos/asf/cassandra/blob/717c1083/src/java/org/apache/cassandra/service/paxos/PrepareResponse.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/paxos/PrepareResponse.java b/src/java/org/apache/cassandra/service/paxos/PrepareResponse.java index 2110dd7..4c7becc 100644 --- a/src/java/org/apache/cassandra/service/paxos/PrepareResponse.java +++ b/src/java/org/apache/cassandra/service/paxos/PrepareResponse.java @@ -45,7 +45,7 @@ public class PrepareResponse public PrepareResponse(boolean promised, Commit inProgressCommit, Commit mostRecentCommit) { assert inProgressCommit.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); - assert inProgressCommit.update.metadata() == mostRecentCommit.update.metadata(); + assert inProgressCommit.update.metadata().id.equals(mostRecentCommit.update.metadata().id); this.promised = promised; this.mostRecentCommit = mostRecentCommit; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org