merge from 1.2

This commit is contained in:
Jonathan Ellis 2013-05-29 15:00:11 -05:00
commit f3b1a2cbcf
4 changed files with 19 additions and 2 deletions

View File

@ -57,6 +57,7 @@
* Support native link w/o JNA in Java7 (CASSANDRA-3734)
1.2.6
* Scale hinted_handoff_throttle_in_kb to cluster size (CASSANDRA-5272)
* (Hadoop) Fix InputKeyRange in CFIF (CASSANDRA-5536)
* Fix dealing with ridiculously large max sstable sizes in LCS (CASSANDRA-5589)
* Ignore pre-truncate hints (CASSANDRA-4655)

View File

@ -66,6 +66,16 @@ Features
API."
1.2.6
=====
Upgrading
---------
- hinted_handoff_throttle_in_kb is now reduced by a factor
proportional to the number of nodes in the cluster (see
https://issues.apache.org/jira/browse/CASSANDRA-5272).
1.2.5
=====

View File

@ -42,7 +42,11 @@ hinted_handoff_enabled: true
# generated. After it has been dead this long, new hints for it will not be
# created until it has been seen alive and gone down again.
max_hint_window_in_ms: 10800000 # 3 hours
# throttle in KBs per second, per delivery thread
# Maximum throttle in KBs per second, per delivery thread. This will be
# reduced proportionally to the number of nodes in the cluster. (If there
# are two nodes in the cluster, each delivery thread will use the maximum
# rate; if there are three, each will throttle to half of the maximum,
# since we expect two nodes to be delivering hints simultaneously.)
hinted_handoff_throttle_in_kb: 1024
# Number of threads with which to deliver hints;
# Consider increasing this number when you have multi-dc deployments, since

View File

@ -318,7 +318,9 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
logger.debug("Using pageSize of {}", pageSize);
// rate limit is in bytes per second. Uses Double.MAX_VALUE if disabled (set to 0 in cassandra.yaml).
int throttleInKB = DatabaseDescriptor.getHintedHandoffThrottleInKB();
// max rate is scaled by the number of nodes in the cluster (CASSANDRA-5272).
int throttleInKB = DatabaseDescriptor.getHintedHandoffThrottleInKB()
/ (StorageService.instance.getTokenMetadata().getAllEndpoints().size() - 1);
RateLimiter rateLimiter = RateLimiter.create(throttleInKB == 0 ? Double.MAX_VALUE : throttleInKB * 1024);
delivery: