cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/6] git commit: Allow overriding max hin ttl. Patch by Vishy Kasar, reviewed by brandonwilliams for CASSANDRA-5988
Date Mon, 28 Oct 2013 16:54:02 GMT
Updated Branches:
  refs/heads/cassandra-1.2 47896c888 -> a0831bb6b
  refs/heads/cassandra-2.0 fcd657cde -> 9e47591d3
  refs/heads/trunk e5f4fd612 -> 4f5edb647


Allow overriding max hin ttl.
Patch by Vishy Kasar, 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/a0831bb6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a0831bb6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a0831bb6

Branch: refs/heads/cassandra-1.2
Commit: a0831bb6b9ad98c280bc97ad0780340985edef7a
Parents: 47896c8
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Oct 28 11:45:24 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Oct 28 11:46:18 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0831bb6/src/java/org/apache/cassandra/db/RowMutation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java
index 5000d79..1a095c5 100644
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@ -45,6 +45,7 @@ public class RowMutation implements IMutation
     public static final RowMutationSerializer serializer = new RowMutationSerializer();
     public static final String FORWARD_TO = "FWD_TO";
     public static final String FORWARD_FROM = "FWD_FRM";
+    static final int maxHintTTL = Integer.parseInt(System.getProperty("cassandra.maxHintTTL",
String.valueOf(Integer.MAX_VALUE)));
 
     private final String table;
     private final ByteBuffer key;
@@ -128,7 +129,7 @@ public class RowMutation implements IMutation
      */
     public int calculateHintTTL()
     {
-        int ttl = Integer.MAX_VALUE;
+        int ttl = maxHintTTL;
         for (ColumnFamily cf : getColumnFamilies())
             ttl = Math.min(ttl, cf.metadata().getGcGraceSeconds());
         return ttl;


Mime
View raw message