cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] cassandra git commit: Re-populate token metadata after commit log recover
Date Wed, 07 Oct 2015 08:45:02 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 557bbbccb -> 587fe51b1


Re-populate token metadata after commit log recover

patch by pauloricardomg; reviewed by carlyeks for CASSANDRA-10293


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

Branch: refs/heads/trunk
Commit: 15334f40c6ff20dc6032bcfcd8c48e0c1ee5c955
Parents: 22099ad
Author: Paulo Motta <pauloricardomg@gmail.com>
Authored: Fri Sep 11 10:22:07 2015 -0300
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Oct 7 10:41:10 2015 +0200

----------------------------------------------------------------------
 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/15334f40/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5bf70ca..ba0012e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
  * Provide additional metrics for materialized views (CASSANDRA-10323)
  * Flush system schema tables after local schema changes (CASSANDRA-10429)
 Merged from 2.2:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15334f40/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 f9ee9e8..d414a59 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -222,6 +222,7 @@ public class CassandraDaemon
          */
         LegacySchemaMigrator.migrate();
 
+        // Populate token metadata before flushing, for token-aware sstable partitioning
(#6696)
         StorageService.instance.populateTokenMetadata();
 
         // load schema from disk
@@ -285,6 +286,9 @@ public class CassandraDaemon
             throw new RuntimeException(e);
         }
 
+        // Re-populate token metadata after commit log recover (new peers might be loaded
onto system keyspace #10293)
+        StorageService.instance.populateTokenMetadata();
+
         // migrate any legacy (pre-3.0) hints from system.hints table into the new store
         new LegacyHintsMigrator(DatabaseDescriptor.getHintsDirectory(), DatabaseDescriptor.getMaxHintsFileSize()).migrate();
 


Mime
View raw message