cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] git commit: Allow overriding max hint ttl Patch by Vishy Kasar and brandonwilliams, reviewed by brandonwilliams for CASSANDRA-5988
Date Mon, 28 Oct 2013 17:01:37 GMT
Updated Branches:
  refs/heads/cassandra-2.0 9e47591d3 -> 27da625fb
  refs/heads/trunk 4f5edb647 -> 7950dc31f


Allow overriding max hint ttl
Patch by Vishy Kasar and brandonwilliams, reviewed by brandonwilliams
for CASSANDRA-5988


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/27da625f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/27da625f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/27da625f

Branch: refs/heads/cassandra-2.0
Commit: 27da625fb2b67edd7615427c679db1b62695d82a
Parents: 9e47591
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Oct 28 11:59:15 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Oct 28 11:59:15 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/HintedHandOffManager.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/27da625f/src/java/org/apache/cassandra/db/HintedHandOffManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/HintedHandOffManager.java b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
index f1e751f..9508a86 100644
--- a/src/java/org/apache/cassandra/db/HintedHandOffManager.java
+++ b/src/java/org/apache/cassandra/db/HintedHandOffManager.java
@@ -103,6 +103,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
     private volatile boolean hintedHandOffPaused = false;
 
     static final CompositeType comparator = CompositeType.getInstance(Arrays.<AbstractType<?>>asList(UUIDType.instance,
Int32Type.instance));
+    static final int maxHintTTL = Integer.parseInt(System.getProperty("cassandra.maxHintTTL",
String.valueOf(Integer.MAX_VALUE)));
 
     private final NonBlockingHashSet<InetAddress> queuedDeliveries = new NonBlockingHashSet<InetAddress>();
 
@@ -146,7 +147,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
      */
     public static int calculateHintTTL(RowMutation mutation)
     {
-        int ttl = Integer.MAX_VALUE;
+        int ttl = maxHintTTL;
         for (ColumnFamily cf : mutation.getColumnFamilies())
             ttl = Math.min(ttl, cf.metadata().getGcGraceSeconds());
         return ttl;


Mime
View raw message