You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2016/12/05 09:32:00 UTC
[jira] [Commented] (CASSANDRA-12671) Support changing hinted
handoff throttle in real time
[ https://issues.apache.org/jira/browse/CASSANDRA-12671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15721721#comment-15721721 ]
Aleksey Yeschenko commented on CASSANDRA-12671:
-----------------------------------------------
Sorry, but I don't think this particular implementation will do.
1. {{getHintedHandoffThrottleBytesPerNode()}} does not belong to {{DatabaseDescriptor}}. That class should be kept as close to a dumb wrapper over {{Config}} as possible.
2. That calculation is not cheap, and as such should not be performed on *every hint read*. Hint:
{code}
public Set<InetAddress> getAllEndpoints()
{
lock.readLock().lock();
try
{
return ImmutableSet.copyOf(endpointToHostIdMap.keySet());
}
finally
{
lock.readLock().unlock();
}
}
{code}
Generally I would recommend reading the source code of every method you call, to know what each of them does under the hood. Can't always move code from one place to another: what's acceptable as a one-off call might not be acceptable on a hot path.
3. How are you even updating {{conf.hinted_handoff_throttle_in_kb}} live? Am I missing something? Are you using a custom configuration provider?
4. Either way, this change, I assume, is not a frequent event. As such changes to the rate limit should be push-based, not pull-based.
> Support changing hinted handoff throttle in real time
> ------------------------------------------------------
>
> Key: CASSANDRA-12671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12671
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Dikang Gu
> Assignee: Dikang Gu
> Priority: Minor
> Fix For: 3.x
>
>
> Problem: currently the sethintedhandoffthrottlekb takes effect when current hints handoff tasks finish, and then applies to next task, which could take hours for big node.
> I think it would be great to change the hinted handoff throttle in real time, which means it takes effect immediately.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)