[1/4] cassandra git commit: Fix setting 'durable_writes' in ALTER KEYSPACE

2015-07-01 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 9627f13ef -> 067141a23


Fix setting 'durable_writes' in ALTER KEYSPACE

patch by Carl Yeksigian; reviewed by Aleksey Yeschenko for
CASSANDRA-9560


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

Branch: refs/heads/trunk
Commit: 3504a50bb4bd93edeb2941dccd9444d53a85a1ed
Parents: 0bdf923
Author: Carl Yeksigian 
Authored: Mon Jun 22 09:18:39 2015 -0400
Committer: Aleksey Yeschenko 
Committed: Wed Jul 1 21:47:07 2015 +0300

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java  |  2 +-
 src/java/org/apache/cassandra/db/DataTracker.java   |  2 +-
 src/java/org/apache/cassandra/db/DefsTables.java|  2 +-
 src/java/org/apache/cassandra/db/Keyspace.java  | 16 +---
 src/java/org/apache/cassandra/db/RowMutation.java   |  2 +-
 .../unit/org/apache/cassandra/db/CommitLogTest.java |  2 +-
 7 files changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2a69292..391874b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)
  * Avoid ballot clash in Paxos (CASSANDRA-9649)
  * Improve trace messages for RR (CASSANDRA-9479)
  * Fix suboptimal secondary index selection when restricted

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4fc2f24..bf1e779 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2075,7 +2075,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // position in the System keyspace.
 logger.debug("truncating {}", name);
 
-if (keyspace.metadata.durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
+if (keyspace.getMetadata().durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
 {
 // flush the CF being truncated before forcing the new segment
 forceBlockingFlush();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DataTracker.java
--
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java 
b/src/java/org/apache/cassandra/db/DataTracker.java
index f6d2c75..e961b77 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -130,7 +130,7 @@ public class DataTracker
  */
 public void renewMemtable()
 {
-assert !cfstore.keyspace.metadata.durableWrites;
+assert !cfstore.keyspace.getMetadata().durableWrites;
 
 Memtable newMemtable = new Memtable(cfstore);
 View currentView, newView;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DefsTables.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java 
b/src/java/org/apache/cassandra/db/DefsTables.java
index 35eecc0..f35d6a5 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -333,7 +333,7 @@ public class DefsTables
 
 if (!StorageService.instance.isClientMode())
 {
-Keyspace.open(ksName).createReplicationStrategy(newKsm);
+Keyspace.open(ksName).setMetadata(newKsm);
 MigrationManager.instance.notifyUpdateKeyspace(newKsm);
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/Keyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java 
b/src/java/org/apache/cassandra/db/Keyspace.java
index 38b7c2b..915ccca 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -70,10 +70,9 @@ public class Keyspace
 DatabaseDescriptor.createAllDirectories();
 }
 
-public final KSMetaData metadata;
-
 /* ColumnFamilyStore per column family */
 private final ConcurrentMap columnFamilyStores = 
new Co

[1/3] cassandra git commit: Fix setting 'durable_writes' in ALTER KEYSPACE

2015-07-01 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 fbe96b3df -> cda407ae0


Fix setting 'durable_writes' in ALTER KEYSPACE

patch by Carl Yeksigian; reviewed by Aleksey Yeschenko for
CASSANDRA-9560


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

Branch: refs/heads/cassandra-2.2
Commit: 3504a50bb4bd93edeb2941dccd9444d53a85a1ed
Parents: 0bdf923
Author: Carl Yeksigian 
Authored: Mon Jun 22 09:18:39 2015 -0400
Committer: Aleksey Yeschenko 
Committed: Wed Jul 1 21:47:07 2015 +0300

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java  |  2 +-
 src/java/org/apache/cassandra/db/DataTracker.java   |  2 +-
 src/java/org/apache/cassandra/db/DefsTables.java|  2 +-
 src/java/org/apache/cassandra/db/Keyspace.java  | 16 +---
 src/java/org/apache/cassandra/db/RowMutation.java   |  2 +-
 .../unit/org/apache/cassandra/db/CommitLogTest.java |  2 +-
 7 files changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2a69292..391874b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)
  * Avoid ballot clash in Paxos (CASSANDRA-9649)
  * Improve trace messages for RR (CASSANDRA-9479)
  * Fix suboptimal secondary index selection when restricted

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4fc2f24..bf1e779 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2075,7 +2075,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // position in the System keyspace.
 logger.debug("truncating {}", name);
 
-if (keyspace.metadata.durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
+if (keyspace.getMetadata().durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
 {
 // flush the CF being truncated before forcing the new segment
 forceBlockingFlush();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DataTracker.java
--
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java 
b/src/java/org/apache/cassandra/db/DataTracker.java
index f6d2c75..e961b77 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -130,7 +130,7 @@ public class DataTracker
  */
 public void renewMemtable()
 {
-assert !cfstore.keyspace.metadata.durableWrites;
+assert !cfstore.keyspace.getMetadata().durableWrites;
 
 Memtable newMemtable = new Memtable(cfstore);
 View currentView, newView;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DefsTables.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java 
b/src/java/org/apache/cassandra/db/DefsTables.java
index 35eecc0..f35d6a5 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -333,7 +333,7 @@ public class DefsTables
 
 if (!StorageService.instance.isClientMode())
 {
-Keyspace.open(ksName).createReplicationStrategy(newKsm);
+Keyspace.open(ksName).setMetadata(newKsm);
 MigrationManager.instance.notifyUpdateKeyspace(newKsm);
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/Keyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java 
b/src/java/org/apache/cassandra/db/Keyspace.java
index 38b7c2b..915ccca 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -70,10 +70,9 @@ public class Keyspace
 DatabaseDescriptor.createAllDirectories();
 }
 
-public final KSMetaData metadata;
-
 /* ColumnFamilyStore per column family */
 private final ConcurrentMap columnFamily

[1/2] cassandra git commit: Fix setting 'durable_writes' in ALTER KEYSPACE

2015-07-01 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 c65d81bfa -> 31aa2a23c


Fix setting 'durable_writes' in ALTER KEYSPACE

patch by Carl Yeksigian; reviewed by Aleksey Yeschenko for
CASSANDRA-9560


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

Branch: refs/heads/cassandra-2.1
Commit: 3504a50bb4bd93edeb2941dccd9444d53a85a1ed
Parents: 0bdf923
Author: Carl Yeksigian 
Authored: Mon Jun 22 09:18:39 2015 -0400
Committer: Aleksey Yeschenko 
Committed: Wed Jul 1 21:47:07 2015 +0300

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java  |  2 +-
 src/java/org/apache/cassandra/db/DataTracker.java   |  2 +-
 src/java/org/apache/cassandra/db/DefsTables.java|  2 +-
 src/java/org/apache/cassandra/db/Keyspace.java  | 16 +---
 src/java/org/apache/cassandra/db/RowMutation.java   |  2 +-
 .../unit/org/apache/cassandra/db/CommitLogTest.java |  2 +-
 7 files changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2a69292..391874b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)
  * Avoid ballot clash in Paxos (CASSANDRA-9649)
  * Improve trace messages for RR (CASSANDRA-9479)
  * Fix suboptimal secondary index selection when restricted

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4fc2f24..bf1e779 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2075,7 +2075,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // position in the System keyspace.
 logger.debug("truncating {}", name);
 
-if (keyspace.metadata.durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
+if (keyspace.getMetadata().durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
 {
 // flush the CF being truncated before forcing the new segment
 forceBlockingFlush();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DataTracker.java
--
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java 
b/src/java/org/apache/cassandra/db/DataTracker.java
index f6d2c75..e961b77 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -130,7 +130,7 @@ public class DataTracker
  */
 public void renewMemtable()
 {
-assert !cfstore.keyspace.metadata.durableWrites;
+assert !cfstore.keyspace.getMetadata().durableWrites;
 
 Memtable newMemtable = new Memtable(cfstore);
 View currentView, newView;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DefsTables.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java 
b/src/java/org/apache/cassandra/db/DefsTables.java
index 35eecc0..f35d6a5 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -333,7 +333,7 @@ public class DefsTables
 
 if (!StorageService.instance.isClientMode())
 {
-Keyspace.open(ksName).createReplicationStrategy(newKsm);
+Keyspace.open(ksName).setMetadata(newKsm);
 MigrationManager.instance.notifyUpdateKeyspace(newKsm);
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/Keyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java 
b/src/java/org/apache/cassandra/db/Keyspace.java
index 38b7c2b..915ccca 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -70,10 +70,9 @@ public class Keyspace
 DatabaseDescriptor.createAllDirectories();
 }
 
-public final KSMetaData metadata;
-
 /* ColumnFamilyStore per column family */
 private final ConcurrentMap columnFamily

cassandra git commit: Fix setting 'durable_writes' in ALTER KEYSPACE

2015-07-01 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 0bdf92350 -> 3504a50bb


Fix setting 'durable_writes' in ALTER KEYSPACE

patch by Carl Yeksigian; reviewed by Aleksey Yeschenko for
CASSANDRA-9560


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

Branch: refs/heads/cassandra-2.0
Commit: 3504a50bb4bd93edeb2941dccd9444d53a85a1ed
Parents: 0bdf923
Author: Carl Yeksigian 
Authored: Mon Jun 22 09:18:39 2015 -0400
Committer: Aleksey Yeschenko 
Committed: Wed Jul 1 21:47:07 2015 +0300

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/db/ColumnFamilyStore.java  |  2 +-
 src/java/org/apache/cassandra/db/DataTracker.java   |  2 +-
 src/java/org/apache/cassandra/db/DefsTables.java|  2 +-
 src/java/org/apache/cassandra/db/Keyspace.java  | 16 +---
 src/java/org/apache/cassandra/db/RowMutation.java   |  2 +-
 .../unit/org/apache/cassandra/db/CommitLogTest.java |  2 +-
 7 files changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2a69292..391874b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)
  * Avoid ballot clash in Paxos (CASSANDRA-9649)
  * Improve trace messages for RR (CASSANDRA-9479)
  * Fix suboptimal secondary index selection when restricted

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4fc2f24..bf1e779 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -2075,7 +2075,7 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 // position in the System keyspace.
 logger.debug("truncating {}", name);
 
-if (keyspace.metadata.durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
+if (keyspace.getMetadata().durableWrites || 
DatabaseDescriptor.isAutoSnapshot())
 {
 // flush the CF being truncated before forcing the new segment
 forceBlockingFlush();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DataTracker.java
--
diff --git a/src/java/org/apache/cassandra/db/DataTracker.java 
b/src/java/org/apache/cassandra/db/DataTracker.java
index f6d2c75..e961b77 100644
--- a/src/java/org/apache/cassandra/db/DataTracker.java
+++ b/src/java/org/apache/cassandra/db/DataTracker.java
@@ -130,7 +130,7 @@ public class DataTracker
  */
 public void renewMemtable()
 {
-assert !cfstore.keyspace.metadata.durableWrites;
+assert !cfstore.keyspace.getMetadata().durableWrites;
 
 Memtable newMemtable = new Memtable(cfstore);
 View currentView, newView;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/DefsTables.java
--
diff --git a/src/java/org/apache/cassandra/db/DefsTables.java 
b/src/java/org/apache/cassandra/db/DefsTables.java
index 35eecc0..f35d6a5 100644
--- a/src/java/org/apache/cassandra/db/DefsTables.java
+++ b/src/java/org/apache/cassandra/db/DefsTables.java
@@ -333,7 +333,7 @@ public class DefsTables
 
 if (!StorageService.instance.isClientMode())
 {
-Keyspace.open(ksName).createReplicationStrategy(newKsm);
+Keyspace.open(ksName).setMetadata(newKsm);
 MigrationManager.instance.notifyUpdateKeyspace(newKsm);
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3504a50b/src/java/org/apache/cassandra/db/Keyspace.java
--
diff --git a/src/java/org/apache/cassandra/db/Keyspace.java 
b/src/java/org/apache/cassandra/db/Keyspace.java
index 38b7c2b..915ccca 100644
--- a/src/java/org/apache/cassandra/db/Keyspace.java
+++ b/src/java/org/apache/cassandra/db/Keyspace.java
@@ -70,10 +70,9 @@ public class Keyspace
 DatabaseDescriptor.createAllDirectories();
 }
 
-public final KSMetaData metadata;
-
 /* ColumnFamilyStore per column family */
 private final ConcurrentMap columnFamily