You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/12/13 17:53:15 UTC

[9/10] git commit: fix temporarily missing schema after upgrade from pre-1.1.5 patch by Marcus Eriksson; reviewed by jbellis for CASSANDRA-5061

fix temporarily missing schema after upgrade from pre-1.1.5
patch by Marcus Eriksson; reviewed by jbellis for CASSANDRA-5061


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

Branch: refs/heads/cassandra-1.2.0
Commit: 3e27a320b41179e9b14c006271827fb79ca5c229
Parents: ca02176
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Dec 13 10:52:01 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Dec 13 10:52:01 2012 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |    1 +
 src/java/org/apache/cassandra/db/DefsTable.java |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e27a320/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 43fe188..e6b1b95 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.8
+ * fix temporarily missing schema after upgrade from pre-1.1.5 (CASSANDRA-5061)
  * reduce log spam from invalid counter shards (CASSANDRA-5026)
  * Improve schema propagation performance (CASSANDRA-5025)
  * Fall back to old describe_splits if d_s_ex is not available (CASSANDRA-4803)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3e27a320/src/java/org/apache/cassandra/db/DefsTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DefsTable.java b/src/java/org/apache/cassandra/db/DefsTable.java
index 4d6b574..d564eaf 100644
--- a/src/java/org/apache/cassandra/db/DefsTable.java
+++ b/src/java/org/apache/cassandra/db/DefsTable.java
@@ -244,6 +244,19 @@ public class DefsTable
 
             mutation.apply();
         }
+        // flush immediately because we read schema before replaying the commitlog
+        try
+        {
+            cfs.forceBlockingFlush();
+        }
+        catch (ExecutionException e)
+        {
+            throw new RuntimeException("Could not flush after fixing schema timestamps", e);
+        }
+        catch (InterruptedException e)
+        {
+            throw new AssertionError(e);
+        }
     }
 
     private static boolean invalidSchemaRow(Row row)