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 2013/12/06 16:27:39 UTC
git commit: Don't resubmit counter mutation runnables internally
Updated Branches:
refs/heads/cassandra-2.0 f7efaffad -> f54f4e2c6
Don't resubmit counter mutation runnables internally
patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-6427
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f54f4e2c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f54f4e2c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f54f4e2c
Branch: refs/heads/cassandra-2.0
Commit: f54f4e2c64375aa1d5070a3a57a52cfd7c7470cf
Parents: f7efaff
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Fri Dec 6 18:27:06 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Fri Dec 6 18:27:06 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 3 +-
.../apache/cassandra/service/StorageProxy.java | 39 +-------------------
2 files changed, 3 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f54f4e2c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8996965..43d0e9d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,7 +5,8 @@
* Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
* Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
* Expose a total memtable size metric for a CF (CASSANDRA-6391)
- * cqlsh: hanlde symlinks properly (CASSANDRA-6425)
+ * cqlsh: handle symlinks properly (CASSANDRA-6425)
+ * Don't resubmit counter mutation runnables internally (CASSANDRA-6427)
Merged from 1.2:
* Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345)
* cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f54f4e2c/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 6e6d98c..56f6aae 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -1105,7 +1105,7 @@ public class StorageProxy implements StorageProxyMBean
final String localDataCenter,
final ConsistencyLevel consistency_level)
{
- return new LocalMutationRunnable()
+ return new DroppableRunnable(MessagingService.Verb.COUNTER_MUTATION)
{
public void runMayThrow()
{
@@ -1945,43 +1945,6 @@ public class StorageProxy implements StorageProxyMBean
}
/**
- * Like DroppableRunnable, but if it aborts, it will rerun (on the mutation stage) after
- * marking itself as a hint in progress so that the hint backpressure mechanism can function.
- */
- private static abstract class LocalMutationRunnable implements Runnable
- {
- private final long constructionTime = System.nanoTime();
-
- public final void run()
- {
- if (TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - constructionTime) > DatabaseDescriptor.getTimeout(MessagingService.Verb.MUTATION))
- {
- MessagingService.instance().incrementDroppedMessages(MessagingService.Verb.MUTATION);
- HintRunnable runnable = new HintRunnable(FBUtilities.getBroadcastAddress())
- {
- protected void runMayThrow() throws Exception
- {
- LocalMutationRunnable.this.runMayThrow();
- }
- };
- submitHint(runnable);
- return;
- }
-
- try
- {
- runMayThrow();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- abstract protected void runMayThrow() throws Exception;
- }
-
- /**
* HintRunnable will decrease totalHintsInProgress and targetHints when finished.
* It is the caller's responsibility to increment them initially.
*/