cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r930941 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/db/commitlog/CommitLog.java
Date Mon, 05 Apr 2010 19:53:38 GMT
Author: jbellis
Date: Mon Apr  5 19:53:38 2010
New Revision: 930941

URL: http://svn.apache.org/viewvc?rev=930941&view=rev
Log:
fix potentially bogus assertion during commitlog discard.  patch by jbellis; reviewed by gdusbabek
for CASSANDRA-936

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/commitlog/CommitLog.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=930941&r1=930940&r2=930941&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Mon Apr  5 19:53:38 2010
@@ -4,6 +4,8 @@
    (CASSANDRA-937)
  * allow querying getAllRanges with empty token list (CASSANDRA-933)
  * fix command line arguments inversion in clustertool (CASSANDRA-942)
+ * fix race condition that could trigger a false-positive assertion
+   during post-flush discard of old commitlog segments (CASSANDRA-936)
 
 
 0.6.0-RC1

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/commitlog/CommitLog.java?rev=930941&r1=930940&r2=930941&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
(original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
Mon Apr  5 19:53:38 2010
@@ -373,10 +373,10 @@ public class CommitLog
 
         /*
          * log replay assumes that we only have to look at entries past the last
-         * flush position, so verify that this flush happens after the last.
+         * flush position, so verify that this flush happens after the last. See CASSANDRA-936
         */
-        assert context.position > context.getSegment().getHeader().getPosition(id) : "discard
called on obsolete context " + context;
-
+        assert context.position >= context.getSegment().getHeader().getPosition(id)
+               : "discard at " + context + " is not after last flush at " + context.getSegment().getHeader().getPosition(id);
         /*
          * Loop through all the commit log files in the history. Now process
          * all files that are older than the one in the context. For each of



Mime
View raw message