[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103594#comment-13103594 ] Jonathan Ellis commented on CASSANDRA-2890: --- How necessary is this if we change SSnitch to match ANTS? Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103613#comment-13103613 ] Sylvain Lebresne commented on CASSANDRA-2890: - bq. How necessary is this if we change SSnitch to match ANTS? That would restore what I though was the previous behavior, i.e, for equal score the first alive replica in ring order will be picked. Which means that provided the ring is well balanced and the client query are well balanced too, the load will be uniform. But that suppose that # client queries are well balanced. True, this is already a requirement to get the best out of your cluster. But it would make it a much stronger requirement as more would depend on it. # this is for when the dynamic snitch returns equal scores. I think that is actually the stronger motivation for this: relying on the scores of the dynamic snitch when those scores are not influenced by the operation we're doing is likely a bad idea. Clusters that have a very low read rate (compared to the write one) will likely still experience poor load balancing. Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103618#comment-13103618 ] Sylvain Lebresne commented on CASSANDRA-2890: - That being said, I do think we should probably change SSnitch to match ANTS. Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103624#comment-13103624 ] Jonathan Ellis commented on CASSANDRA-2890: --- Sounds reasonable. Should we move threadlocalrandom to FBUtilities since we have one in CounterMutation as well? Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103631#comment-13103631 ] Sylvain Lebresne commented on CASSANDRA-2890: - bq. Should we move threadlocalrandom to FBUtilities since we have one in CounterMutation as well? We have one in ReadCallback too, and one or two places where we create one shot random object. We could move all that to FBUtilities? Note though that is won't save us much allocation since all those uses of Random are done in different thread pools (and the one in CounterMutation may go away with CASSANDRA-3178 anyway). Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103658#comment-13103658 ] Jonathan Ellis commented on CASSANDRA-2890: --- Would just like to consolidate the code, like we did w/ ThreadLocalMessageDigest. Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103685#comment-13103685 ] Jonathan Ellis commented on CASSANDRA-2890: --- +1 Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch, 2890_v2.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13103729#comment-13103729 ] Hudson commented on CASSANDRA-2890: --- Integrated in Cassandra-0.8 #325 (See [https://builds.apache.org/job/Cassandra-0.8/325/]) Randomize choice of first replica for counter increments patch by slebresne; reviewed by jbellis for CASSANDRA-2890 slebresne : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1170219 Files : * /cassandra/branches/cassandra-0.8/CHANGES.txt * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/CounterMutation.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/ReadCallback.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/StorageProxy.java * /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/utils/FBUtilities.java Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 0.8.6 Attachments: 2890.patch, 2890_v2.patch Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2890) Randomize (to some extend) the choice of the first replica for counter increment
[ https://issues.apache.org/jira/browse/CASSANDRA-2890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13100715#comment-13100715 ] Stu Hood commented on CASSANDRA-2890: - Randomizing the first replica will break dynamic snitch behaviour. If we're assuming: 1) everyone uses the dynamic snitch 2) some folks perform nearly 100% writes, and very few client reads ...would it be better to start recording the replicate-on-writes latencies in the dynamic snitch, so that the first replica will be chosen based on latency, rather than raw snitch scores? Randomize (to some extend) the choice of the first replica for counter increment Key: CASSANDRA-2890 URL: https://issues.apache.org/jira/browse/CASSANDRA-2890 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 0.8.0 Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Labels: counters Fix For: 1.1 Right now, we choose the first replica for a counter increments based solely on what the snitch returns. If the clients requests are well balanced over the cluster and the snitch not ill configured, this should not be a problem, but this is probably too strong an assumption to make. The goal of this ticket is to change this to choose a random replica in the current data center instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira