Avoid race-prone second "scrub" of system keyspace patch by Josh McKenzie; reviewed by jbellis for CASSANDRA-6797
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ab2717b6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ab2717b6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ab2717b6 Branch: refs/heads/cassandra-2.1 Commit: ab2717b6f6475a5d925058338549d31bb2776e6e Parents: 1630493 Author: Jonathan Ellis <jbel...@apache.org> Authored: Tue Mar 4 17:10:16 2014 -0600 Committer: Jonathan Ellis <jbel...@apache.org> Committed: Tue Mar 4 17:10:16 2014 -0600 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/CassandraDaemon.java | 4 ++++ 2 files changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab2717b6/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 8eb10cd..19cedd8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.6 + * Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797) * Pool CqlRecordWriter clients by inetaddress rather than Range (CASSANDRA-6665) * Fix compaction_history timestamps (CASSANDRA-6784) http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab2717b6/src/java/org/apache/cassandra/service/CassandraDaemon.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java index b3f7ff3..d8c56f1 100644 --- a/src/java/org/apache/cassandra/service/CassandraDaemon.java +++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java @@ -264,6 +264,10 @@ public class CassandraDaemon // clean up debris in the rest of the keyspaces for (String keyspaceName : Schema.instance.getKeyspaces()) { + // Skip system as we've already cleaned it + if (keyspaceName.equals(Keyspace.SYSTEM_KS)) + continue; + for (CFMetaData cfm : Schema.instance.getKeyspaceMetaData(keyspaceName).values()) ColumnFamilyStore.scrubDataDirectories(keyspaceName, cfm.cfName); }