You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2023/01/25 20:33:33 UTC
[cassandra] 15/27: Ninja for CASSANDRA-17719 disable the checks in increaseSlightly and decreaseSlightly to get back to the old behavior for now
This is an automated email from the ASF dual-hosted git repository.
maedhroz pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit da8c1c723f76eb401808719977aa35082b679036
Author: David Capwell <dc...@apache.org>
AuthorDate: Fri Dec 16 14:13:17 2022 -0800
Ninja for CASSANDRA-17719 disable the checks in increaseSlightly and decreaseSlightly to get back to the old behavior for now
---
src/java/org/apache/cassandra/dht/Murmur3Partitioner.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java b/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
index d461d4cb79..1f7f3605e9 100644
--- a/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
+++ b/src/java/org/apache/cassandra/dht/Murmur3Partitioner.java
@@ -221,16 +221,21 @@ public class Murmur3Partitioner implements IPartitioner
@Override
public LongToken increaseSlightly()
{
- if (token == MAXIMUM)
- throw new IllegalArgumentException("Cannot increase above MAXIMUM");
+ // CASSANDRA-17109 Added the below checks, but paxos tests were not updated, rather than fix
+ // the paxos tests, disabling the checks for now. The current paxos tests bias twards MIN but
+ // not for MAX, which makes the test very flaky as when MAX is generated the test fails...
+// if (token == MAXIMUM)
+// throw new IllegalArgumentException("Cannot increase above MAXIMUM");
return new LongToken(token + 1);
}
public LongToken decreaseSlightly()
{
- if (equals(MINIMUM))
- throw new IllegalArgumentException("Cannot decrease below MINIMUM");
+ // CASSANDRA-17109 Added the below checks, but paxos tests were not updated, rather than fix
+ // the paxos tests, disabling the checks for now
+// if (equals(MINIMUM))
+// throw new IllegalArgumentException("Cannot decrease below MINIMUM");
return new LongToken(token - 1);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org