cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/3] cassandra git commit: AssertionError when listing sstable files on inconsistent disk state
Date Thu, 11 Feb 2016 08:20:43 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 11bfd1963 -> 62f94b74e
  refs/heads/trunk 559280bf1 -> ebd6c23df


AssertionError when listing sstable files on inconsistent disk state

patch by Stefania Alborghetti; reviewed by marcuse for CASSANDRA-11156


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

Branch: refs/heads/cassandra-3.0
Commit: 62f94b74e6be0d57335b92e90e13ad8d0ff7cb9f
Parents: 11bfd19
Author: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Authored: Thu Feb 11 12:06:31 2016 +0800
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Thu Feb 11 09:17:46 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/db/lifecycle/LogFile.java           | 2 +-
 .../org/apache/cassandra/db/lifecycle/LogTransactionTest.java     | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/62f94b74/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5530f09..188cdd6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.4
+ * AssertionError when listing sstable files on inconsistent disk state (CASSANDRA-11156)
  * Fix wrong rack counting and invalid conditions check for TokenAllocation
    (CASSANDRA-11139)
  * Avoid creating empty hint files (CASSANDRA-11090)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62f94b74/src/java/org/apache/cassandra/db/lifecycle/LogFile.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java
index 8657869..9064e5f 100644
--- a/src/java/org/apache/cassandra/db/lifecycle/LogFile.java
+++ b/src/java/org/apache/cassandra/db/lifecycle/LogFile.java
@@ -127,7 +127,7 @@ final class LogFile
 
     boolean verify()
     {
-        assert records.isEmpty();
+        records.clear();
         if (!replicas.readRecords(records))
         {
             logger.error("Failed to read records from {}", replicas);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/62f94b74/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java b/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java
index df05d71..4f2fc73 100644
--- a/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java
+++ b/test/unit/org/apache/cassandra/db/lifecycle/LogTransactionTest.java
@@ -1079,7 +1079,8 @@ public class LogTransactionTest extends AbstractTransactionalTest
         }
         catch(RuntimeException e)
         {
-            //pass
+            //pass as long as the cause is not an assertion
+            assertFalse(e.getCause() instanceof AssertionError);
         }
 
         logs.finish();


Mime
View raw message