This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9729e3f Allow overriding Gossiper.aVeryLongTime
9729e3f is described below
commit 9729e3f987f1b3dea6a57cc93ba10b75930850c9
Author: Brandon Williams <[email protected]>
AuthorDate: Wed Feb 26 15:04:06 2020 -0600
Allow overriding Gossiper.aVeryLongTime
Patch by brandonwilliams, reviewed by David Capwell for CASSANDRA-15569
---
src/java/org/apache/cassandra/gms/Gossiper.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java
b/src/java/org/apache/cassandra/gms/Gossiper.java
index ef7b093..f276fbd 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -114,7 +114,7 @@ public class Gossiper implements
IFailureDetectionEventListener, GossiperMBean
// Timestamp to prevent processing any in-flight messages for we've not
send any SYN yet, see CASSANDRA-12653.
volatile long firstSynSendAt = 0L;
- public static final long aVeryLongTime = 259200 * 1000; // 3 days
+ public static final long aVeryLongTime = getVeryLongTime();
// Maximimum difference between generation value and local time we are
willing to accept about a peer
static final int MAX_GENERATION_DIFFERENCE = 86400 * 365;
@@ -189,6 +189,17 @@ public class Gossiper implements
IFailureDetectionEventListener, GossiperMBean
private static final boolean disableThreadValidation =
Boolean.getBoolean(Props.DISABLE_THREAD_VALIDATION);
+ private static long getVeryLongTime()
+ {
+ String newVLT = System.getProperty("cassandra.very_long_time_ms");
+ if (newVLT != null)
+ {
+ logger.info("Overriding aVeryLongTime to {}ms", newVLT);
+ return Long.parseLong(newVLT);
+ }
+ return 259200 * 1000; // 3 days
+ }
+
private static boolean isInGossipStage()
{
return ((JMXEnabledSingleThreadExecutor)
Stage.GOSSIP.executor()).isExecutedBy(Thread.currentThread());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]