You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2013/02/14 05:56:42 UTC
[1/3] git commit: Stop compactions from handing during bootstrap.
Patch by brandonwilliams, reviewed by Vijay for CASSANDRA-5244
Stop compactions from handing during bootstrap.
Patch by brandonwilliams, reviewed by Vijay for CASSANDRA-5244
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3925f560
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3925f560
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3925f560
Branch: refs/heads/cassandra-1.2
Commit: 3925f56061307971008fdd0db48c4e29e0700443
Parents: 99b3963
Author: Brandon Williams <br...@apache.org>
Authored: Wed Feb 13 22:55:52 2013 -0600
Committer: Brandon Williams <br...@apache.org>
Committed: Wed Feb 13 22:56:40 2013 -0600
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/cassandra/service/StorageService.java | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3925f560/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3d0f633..9281b5e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -19,6 +19,7 @@
* Add support for LZ4 compression (CASSANDRA-5038)
* Fix missing columns in wide rows queries (CASSANDRA-5225)
* Simplify auth setup and make system_auth ks alterable (CASSANDRA-5112)
+ * Stop compactions from hanging during bootstrap (CASSANDRA-5244)
1.2.1
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3925f560/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 8c1d053..9ce4bf0 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -36,6 +36,7 @@ import javax.management.ObjectName;
import com.google.common.collect.*;
+import com.google.common.util.concurrent.AtomicDouble;
import org.apache.cassandra.db.index.SecondaryIndex;
import org.apache.log4j.Level;
import org.apache.commons.lang.StringUtils;
@@ -93,6 +94,8 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
/* JMX notification serial number counter */
private final AtomicLong notificationSerialNumber = new AtomicLong();
+ private final AtomicDouble severity = new AtomicDouble();
+
private static int getRingDelay()
{
String newdelay = System.getProperty("cassandra.ring_delay_ms");
@@ -901,12 +904,11 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
/**
* Gossip about the known severity of the events in this node
*/
- public synchronized boolean reportSeverity(double incr)
+ public boolean reportSeverity(double incr)
{
if (!Gossiper.instance.isEnabled())
return false;
- double update = getSeverity(FBUtilities.getBroadcastAddress()) + incr;
- VersionedValue updated = StorageService.instance.valueFactory.severity(update);
+ VersionedValue updated = StorageService.instance.valueFactory.severity(severity.addAndGet(incr));
Gossiper.instance.addLocalApplicationState(ApplicationState.SEVERITY, updated);
return true;
}