cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1151494 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/db/HintedHandOffManager.java src/java/org/apache/cassandra/db/migration/Migration.java
Date Wed, 27 Jul 2011 15:13:37 GMT
Author: jbellis
Date: Wed Jul 27 15:13:36 2011
New Revision: 1151494

URL: http://svn.apache.org/viewvc?rev=1151494&view=rev
Log:
keep gossipped version in sync with actual on migration coordinator
patch by jbellis; reviewed by brandonwilliams and tested by Richard Low for CASSANDRA-2946

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/migration/Migration.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1151494&r1=1151493&r2=1151494&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Wed Jul 27 15:13:36 2011
@@ -7,6 +7,8 @@
  * expose data_dir though jmx (CASSANDRA-2770)
  * don't include tmp files as sstable when create cfs (CASSANDRA-2929)
  * log Java classpath on startup (CASSANDRA-2895)
+ * keep gossipped version in sync with actual on migration coordinator 
+   (CASSANDRA-2946)
 
 
 0.8.2

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java?rev=1151494&r1=1151493&r2=1151494&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/HintedHandOffManager.java
Wed Jul 27 15:13:36 2011
@@ -281,6 +281,9 @@ public class HintedHandOffManager implem
         }
         waited = 0;
         // then wait for the correct schema version.
+        // usually we use DD.getDefsVersion, which checks the local schema uuid as stored
in the system table.
+        // here we check the one in gossip instead; this serves as a canary to warn us if
we introduce a bug that
+        // causes the two to diverge (see CASSANDRA-2946)
         while (!gossiper.getEndpointStateForEndpoint(endpoint).getApplicationState(ApplicationState.SCHEMA).value.equals(
                 gossiper.getEndpointStateForEndpoint(FBUtilities.getLocalAddress()).getApplicationState(ApplicationState.SCHEMA).value))
         {

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/migration/Migration.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/migration/Migration.java?rev=1151494&r1=1151493&r2=1151494&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/migration/Migration.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/migration/Migration.java
Wed Jul 27 15:13:36 2011
@@ -159,6 +159,7 @@ public abstract class Migration
         assert !StorageService.instance.isClientMode();
         assert column != null;
         MigrationManager.announce(column);
+        passiveAnnounce(); // keeps gossip in sync w/ what we just told everyone
     }
 
     public final void passiveAnnounce()



Mime
View raw message