cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/6] git commit: Refuse snapshots during bootstrap. Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-6585
Date Wed, 15 Jan 2014 22:04:20 GMT
Updated Branches:
  refs/heads/cassandra-1.2 0d38b25f6 -> 5f635782a
  refs/heads/cassandra-2.0 7514e61b4 -> 27488a57c
  refs/heads/trunk 8b0906126 -> 6abe16d36


Refuse snapshots during bootstrap.
Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-6585


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

Branch: refs/heads/cassandra-1.2
Commit: 5f635782a8cbe45f1d00ec4f2ed50e1827d3d498
Parents: 0d38b25
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Jan 15 15:58:46 2014 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Jan 15 15:58:46 2014 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/StorageService.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f635782/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 043a1eb..7c8a257 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2172,6 +2172,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
      */
     public void takeSnapshot(String tag, String... tableNames) throws IOException
     {
+        if (operationMode.equals(Mode.JOINING))
+            throw new IOException("Cannot snapshot until bootstrap completes");
         if (tag == null || tag.equals(""))
             throw new IOException("You must supply a snapshot name.");
 
@@ -2207,6 +2209,8 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
      */
     public void takeColumnFamilySnapshot(String tableName, String columnFamilyName, String
tag) throws IOException
     {
+        if (operationMode.equals(Mode.JOINING))
+            throw new IOException("Cannot snapshot until bootstrap completes");
         if (tableName == null)
             throw new IOException("You must supply a table name");
 


Mime
View raw message