You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2014/06/18 22:16:53 UTC

[1/2] git commit: Fix assertion error in CL.ANY timeout handling

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 43d248f91 -> 423b62cd3


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.1
Commit: afa304e3385b299cf53e949a9533bc08ead4c1de
Parents: 760441b
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Jun 18 13:13:00 2014 -0700
Committer: Aleksey Yeschenko <al...@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");
             }


[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by al...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/service/StorageProxy.java


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

Branch: refs/heads/cassandra-2.1
Commit: 423b62cd3521188acd7a5c051b56182eeddeafe5
Parents: 43d248f afa304e
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Jun 18 13:16:48 2014 -0700
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Jun 18 13:16:48 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/423b62cd/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 329da9b,776d294..335192b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,23 -1,22 +1,24 @@@
 -2.0.9
 - * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
 - * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
 +2.1.0
 + * Avoid incremental compaction on Windows (CASSANDRA-7365)
 + * Fix exception when querying a composite-keyed table with a collection index
 +   (CASSANDRA-7372)
 + * Use node's host id in place of counter ids (CASSANDRA-7366)
   * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
 + * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
 + * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
 + * Don't fail streams on failure detector downs (CASSANDRA-3569)
 + * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
 + * Reduce run time for CQL tests (CASSANDRA-7327)
 + * Fix heap size calculation on Windows (CASSANDRA-7352, 7353)
 + * RefCount native frames from netty (CASSANDRA-7245)
 + * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
 +Merged from 2.0:
++ * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
   * Add per-CF range read request latency metrics (CASSANDRA-7338)
   * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 - * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 - * Swap local and global default read repair chances (CASSANDRA-7320)
 - * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 - * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 - * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 - * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 - * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 - * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 - * Add authentication support to shuffle (CASSANDRA-6484)
 - * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
   * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
   * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 - * Reference sstables before populating key cache (CASSANDRA-7234)
  Merged from 1.2:
   * Fix problem truncating on a node that was previously in a dead state (CASSANDRA-7318)
   * Don't insert tombstones that hide indexed values into 2i (CASSANDRA-7268)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/423b62cd/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageProxy.java
index 890315a,3b10cff..2433457
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@@ -492,7 -487,12 +492,12 @@@ public class StorageProxy implements St
                      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((Mutation) 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);
++                            submitHint((Mutation) mutation, target, null);
+                     }
                  }
                  Tracing.trace("Wrote hint to satisfy CL.ANY after no replicas acknowledged the write");
              }