You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2013/10/28 17:54:03 UTC
[2/6] git commit: Allow overriding max hin ttl. Patch by Vishy Kasar,
reviewed by brandonwilliams for CASSANDRA-5988
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-2.0
Commit: a0831bb6b9ad98c280bc97ad0780340985edef7a
Parents: 47896c8
Author: Brandon Williams <br...@apache.org>
Authored: Mon Oct 28 11:45:24 2013 -0500
Committer: Brandon Williams <br...@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;