cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Wed, 04 Oct 2017 06:23:09 GMT
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 8ebef8e71a5ded0d5964e1ae315c9875db2e005f
Parents: 982ab93 f5bc429
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Wed Oct 4 08:20:54 2017 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Wed Oct 4 08:20:54 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cassandra/db/compaction/Verifier.java       | 31 ++++++++++++++++----
 .../org/apache/cassandra/db/VerifyTest.java     | 25 ++++++++++++++++
 3 files changed, 52 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ebef8e7/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ebef8e7/src/java/org/apache/cassandra/db/compaction/Verifier.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/Verifier.java
index bca6e79,4c07bb6..22cf813
--- a/src/java/org/apache/cassandra/db/compaction/Verifier.java
+++ b/src/java/org/apache/cassandra/db/compaction/Verifier.java
@@@ -234,8 -250,14 +249,14 @@@ public class Verifier implements Closea
  
      private void markAndThrow() throws IOException
      {
-         sstable.descriptor.getMetadataSerializer().mutateRepaired(sstable.descriptor, ActiveRepairService.UNREPAIRED_SSTABLE,
sstable.getSSTableMetadata().pendingRepair);
-         throw new CorruptSSTableException(new Exception(String.format("Invalid SSTable %s,
please force repair", sstable.getFilename())), sstable.getFilename());
+         markAndThrow(true);
+     }
+ 
+     private void markAndThrow(boolean mutateRepaired) throws IOException
+     {
+         if (mutateRepaired) // if we are able to mutate repaired flag, an incremental repair
should be enough
 -            sstable.descriptor.getMetadataSerializer().mutateRepairedAt(sstable.descriptor,
ActiveRepairService.UNREPAIRED_SSTABLE);
++            sstable.descriptor.getMetadataSerializer().mutateRepaired(sstable.descriptor,
ActiveRepairService.UNREPAIRED_SSTABLE, sstable.getSSTableMetadata().pendingRepair);
+         throw new CorruptSSTableException(new Exception(String.format("Invalid SSTable %s,
please force %srepair", sstable.getFilename(), mutateRepaired ? "" : "a full ")), sstable.getFilename());
      }
  
      public CompactionInfo.Holder getVerifyInfo()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ebef8e7/test/unit/org/apache/cassandra/db/VerifyTest.java
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message