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 27312C4B3 for ; Thu, 11 Dec 2014 14:20:36 +0000 (UTC) Received: (qmail 29864 invoked by uid 500); 11 Dec 2014 14:20:36 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 29837 invoked by uid 500); 11 Dec 2014 14:20:36 -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 29576 invoked by uid 99); 11 Dec 2014 14:20:35 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 14:20:35 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 95399A26502; Thu, 11 Dec 2014 14:20:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org Date: Thu, 11 Dec 2014 14:20:35 -0000 Message-Id: <2931c06422294d2d8bb63d8e08fe0ee3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cassandra git commit: Fix error message on read repair timeouts Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 27c67ad85 -> 745ddd1c2 Fix error message on read repair timeouts patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for CASSANDRA-7947 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/451c514a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/451c514a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/451c514a Branch: refs/heads/cassandra-2.1 Commit: 451c514a3a02f4e889f040176453beefbcd75843 Parents: 5784309 Author: Sam Tunnicliffe Authored: Thu Dec 11 15:17:29 2014 +0100 Committer: Aleksey Yeschenko Committed: Thu Dec 11 15:17:29 2014 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/451c514a/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 385af01..cd302fb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.12: + * Fix error message on read repair timeouts (CASSANDRA-7947) * Default DTCS base_time_seconds changed to 60 (CASSANDRA-8417) * Refuse Paxos operation with more than one pending endpoint (CASSANDRA-8346) * Throw correct exception when trying to bind a keyspace or table http://git-wip-us.apache.org/repos/asf/cassandra/blob/451c514a/src/java/org/apache/cassandra/service/StorageProxy.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index f877aee..1e1a2a3 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -1368,6 +1368,17 @@ public class StorageProxy implements StorageProxyMBean { throw new AssertionError(e); // full data requested from each node here, no digests should be sent } + catch (ReadTimeoutException e) + { + if (Tracing.isTracing()) + Tracing.trace("Timed out waiting on digest mismatch repair requests"); + else + logger.debug("Timed out waiting on digest mismatch repair requests"); + // the caught exception here will have CL.ALL from the repair command, + // not whatever CL the initial command was at (CASSANDRA-7947) + int blockFor = consistencyLevel.blockFor(Keyspace.open(command.getKeyspace())); + throw new ReadTimeoutException(consistencyLevel, blockFor-1, blockFor, true); + } RowDataResolver resolver = (RowDataResolver)handler.resolver; try @@ -1378,7 +1389,10 @@ public class StorageProxy implements StorageProxyMBean } catch (TimeoutException e) { - Tracing.trace("Timed out on digest mismatch retries"); + if (Tracing.isTracing()) + Tracing.trace("Timed out waiting on digest mismatch repair acknowledgements"); + else + logger.debug("Timed out waiting on digest mismatch repair acknowledgements"); int blockFor = consistencyLevel.blockFor(Keyspace.open(command.getKeyspace())); throw new ReadTimeoutException(consistencyLevel, blockFor-1, blockFor, true); }