cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [7/10] git commit: fix temporarily missing schema after upgrade from pre-1.1.5 patch by Marcus Eriksson; reviewed by jbellis for CASSANDRA-5061
Date Thu, 13 Dec 2012 16:53:15 GMT
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/trunk
Commit: 3e27a320b41179e9b14c006271827fb79ca5c229
Parents: ca02176
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Dec 13 10:52:01 2012 -0600
Committer: Jonathan Ellis <jbellis@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)


Mime
View raw message