Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8CED1116D for ; Thu, 24 Jul 2014 20:37:38 +0000 (UTC) Received: (qmail 52729 invoked by uid 500); 24 Jul 2014 20:37:38 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 52688 invoked by uid 500); 24 Jul 2014 20:37:38 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 52672 invoked by uid 99); 24 Jul 2014 20:37:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 20:37:38 +0000 Date: Thu, 24 Jul 2014 20:37:38 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-6930) Dynamic Snitch isWorthMergingForRangeQuery Doesn't Handle Some Cases Optimally MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-6930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-6930: -------------------------------------- Reviewer: Tyler Hobbs [~thobbs] to review > Dynamic Snitch isWorthMergingForRangeQuery Doesn't Handle Some Cases Optimally > ------------------------------------------------------------------------------ > > Key: CASSANDRA-6930 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6930 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Tyler Hobbs > Assignee: Ala' Alkhaldi > Priority: Minor > Labels: lhf > Fix For: 2.0.10 > > Attachments: 9630-v1.txt > > > I was investigating slow responses for queries like {{select * from system.peers}} and noticed that the dynamic endpoint snitch was reporting that the query was _not_ worth merging. In this case, the local host had a score of 0, so {{return maxMerged < maxL1 + maxL2}} was returning false. I believe using a {{<=}} condition is the proper fix there. > Additionally, because scores are looked up three separate times, this method is a prone to race conditions. I don't think it's worth fixing the race condition for a multi-node scenario, but at least in the single-node case, we can immediately return true and avoid any race conditions that would cause it to erroneously return false. -- This message was sent by Atlassian JIRA (v6.2#6252)