Merge branch 'cassandra-1.2' into cassandra-2.0
Conflicts:
src/java/org/apache/cassandra/gms/FailureDetector.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c988180
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c988180
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c988180
Branch: refs/heads/trunk
Commit: 9c988180730a18a12f14f3868bf9cb6afced414a
Parents: e9a57fb c0c31ed
Author: Brandon Williams <[email protected]>
Authored: Wed Jan 22 13:42:30 2014 -0600
Committer: Brandon Williams <[email protected]>
Committed: Wed Jan 22 13:42:30 2014 -0600
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/gms/FailureDetector.java | 30 ++++++++++++++++++--
2 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c988180/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index b08f04b,524ffb7..6aa944d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -18,29 -14,10 +18,30 @@@ Merged from 1.2
* Paginate batchlog replay (CASSANDRA-6569)
* skip blocking on streaming during drain (CASSANDRA-6603)
* Improve error message when schema doesn't match loaded sstable
(CASSANDRA-6262)
+ * Add properties to adjust FD initial value and max interval (CASSANDRA-4375)
-1.2.13
+2.0.4
+ * Allow removing snapshots of no-longer-existing CFs (CASSANDRA-6418)
+ * add StorageService.stopDaemon() (CASSANDRA-4268)
+ * add IRE for invalid CF supplied to get_count (CASSANDRA-5701)
+ * add client encryption support to sstableloader (CASSANDRA-6378)
+ * Fix accept() loop for SSL sockets post-shutdown (CASSANDRA-6468)
+ * Fix size-tiered compaction in LCS L0 (CASSANDRA-6496)
+ * Fix assertion failure in filterColdSSTables (CASSANDRA-6483)
+ * Fix row tombstones in larger-than-memory compactions (CASSANDRA-6008)
+ * Fix cleanup ClassCastException (CASSANDRA-6462)
+ * Reduce gossip memory use by interning VersionedValue strings
(CASSANDRA-6410)
+ * Allow specifying datacenters to participate in a repair (CASSANDRA-6218)
+ * Fix divide-by-zero in PCI (CASSANDRA-6403)
+ * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
+ * Add millisecond precision formats to the timestamp parser (CASSANDRA-6395)
+ * Expose a total memtable size metric for a CF (CASSANDRA-6391)
+ * cqlsh: handle symlinks properly (CASSANDRA-6425)
+ * Fix potential infinite loop when paging query with IN (CASSANDRA-6464)
+ * Fix assertion error in AbstractQueryPager.discardFirst (CASSANDRA-6447)
+ * Fix streaming older SSTable yields unnecessary tombstones (CASSANDRA-6527)
+Merged from 1.2:
* Improved error message on bad properties in DDL queries (CASSANDRA-6453)
* Randomize batchlog candidates selection (CASSANDRA-6481)
* Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345, 6485)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c988180/src/java/org/apache/cassandra/gms/FailureDetector.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/FailureDetector.java
index 4e5ba90,7a35c34..a7eb82f
--- a/src/java/org/apache/cassandra/gms/FailureDetector.java
+++ b/src/java/org/apache/cassandra/gms/FailureDetector.java
@@@ -288,20 -293,32 +301,33 @@@ class ArrivalWindo
// in the event of a long partition, never record an interval longer than
the rpc timeout,
// since if a host is regularly experiencing connectivity problems
lasting this long we'd
// rather mark it down quickly instead of adapting
- private final long MAX_INTERVAL_IN_NANO =
DatabaseDescriptor.getRpcTimeout() * MILLI_TO_NANO;
+ // this value defaults to the same initial value the FD is seeded with
- private final int MAX_INTERVAL_IN_MS = getMaxInterval();
++ private final long MAX_INTERVAL_IN_NANO = getMaxInterval() *
MILLI_TO_NANO;
ArrivalWindow(int size)
{
arrivalIntervals = new BoundedStatsDeque(size);
}
+ private static int getMaxInterval()
+ {
+ String newvalue = System.getProperty("cassandra.fd_max_interval_ms");
+ if (newvalue != null)
+ {
+ logger.info("Overriding FD MAX_INTERVAL to {}ms", newvalue);
+ return Integer.parseInt(newvalue);
+ }
+ else
+ return FailureDetector.INITIAL_VALUE;
+ }
+
- synchronized void add(double value)
+ synchronized void add(long value)
{
+ assert tLast >= 0;
if (tLast > 0L)
{
- double interArrivalTime = (value - tLast);
- if (interArrivalTime <= MAX_INTERVAL_IN_MS)
+ long interArrivalTime = (value - tLast);
+ if (interArrivalTime <= MAX_INTERVAL_IN_NANO)
arrivalIntervals.add(interArrivalTime);
else
logger.debug("Ignoring interval time of {}",
interArrivalTime);