cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Fix assertion error in CL.ANY timeout handling
Date Wed, 18 Jun 2014 20:14:18 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 760441ba0 -> afa304e33


Fix assertion error in CL.ANY timeout handling

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-7364


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/afa304e3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/afa304e3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/afa304e3

Branch: refs/heads/cassandra-2.0
Commit: afa304e3385b299cf53e949a9533bc08ead4c1de
Parents: 760441b
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jun 18 13:13:00 2014 -0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jun 18 13:13:00 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 src/java/org/apache/cassandra/service/StorageProxy.java | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/afa304e3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 501e740..776d294 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.9
+ * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
  * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
  * Fix native protocol CAS batches (CASSANDRA-7337)
  * Add per-CF range read request latency metrics (CASSANDRA-7338)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/afa304e3/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 59834cf..3b10cff 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -487,7 +487,12 @@ public class StorageProxy implements StorageProxyMBean
                     List<InetAddress> naturalEndpoints = StorageService.instance.getNaturalEndpoints(mutation.getKeyspaceName(),
tk);
                     Collection<InetAddress> pendingEndpoints = StorageService.instance.getTokenMetadata().pendingEndpointsFor(tk,
mutation.getKeyspaceName());
                     for (InetAddress target : Iterables.concat(naturalEndpoints, pendingEndpoints))
-                        submitHint((RowMutation) mutation, target, null);
+                    {
+                        // local writes can timeout, but cannot be dropped (see LocalMutationRunnable
and
+                        // CASSANDRA-6510), so there is no need to hint or retry
+                        if (!target.equals(FBUtilities.getBroadcastAddress()) &&
shouldHint(target))
+                            submitHint((RowMutation) mutation, target, null);
+                    }
                 }
                 Tracing.trace("Wrote hint to satisfy CL.ANY after no replicas acknowledged
the write");
             }


Mime
View raw message