This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
new 979a71b Avoid hinted handoff per-host throttle being arounded to 0 in
large cluster
979a71b is described below
commit 979a71b13af0fac643a6cd6957e74313139ed17d
Author: Zhao Yang <[email protected]>
AuthorDate: Sun Jun 7 01:14:56 2020 +0800
Avoid hinted handoff per-host throttle being arounded to 0 in large cluster
Patch by Zhao Yang, reviewed by snazy and brandonwilliams for
CASSANDRA-15859
---
CHANGES.txt | 1 +
src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 631b329..16974c4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.21
+ * Avoid hinted handoff per-host throttle being arounded to 0 in large cluster
(CASSANDRA-15859)
* Avoid emitting empty range tombstones from RangeTombstoneList
(CASSANDRA-15924)
* Avoid thread starvation, and improve compare-and-swap performance, in the
slab allocators (CASSANDRA-15922)
* Fix broken KEYS 2i queries after DROP COMPACT STORAGE (CASSANDRA-15906)
diff --git a/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
b/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
index c562dd0..eda4179 100644
--- a/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
@@ -206,8 +206,8 @@ final class HintsDispatchExecutor
// not total outgoing hints traffic from this node - this is why
the rate limiter is not shared between
// all the dispatch tasks (as there will be at most one dispatch
task for a particular host id at a time).
int nodesCount = Math.max(1,
StorageService.instance.getTokenMetadata().getAllEndpoints().size() - 1);
- int throttleInKB =
DatabaseDescriptor.getHintedHandoffThrottleInKB() / nodesCount;
- this.rateLimiter = RateLimiter.create(throttleInKB == 0 ?
Double.MAX_VALUE : throttleInKB * 1024);
+ double throttleInBytes =
DatabaseDescriptor.getHintedHandoffThrottleInKB() * 1024.0 / nodesCount;
+ this.rateLimiter = RateLimiter.create(throttleInBytes == 0 ?
Double.MAX_VALUE : throttleInBytes);
}
public void run()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]