cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/6] cassandra git commit: Remove checksum files after replaying hints
Date Fri, 15 Jan 2016 15:07:55 GMT
Remove checksum files after replaying hints

patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for
CASSANDRA-10947


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

Branch: refs/heads/cassandra-3.3
Commit: a029976965984cf6e6bb3fab5e6eab78e3942cc3
Parents: 7aa4dc5
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Thu Jan 14 15:27:49 2016 +0000
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Jan 15 15:05:13 2016 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java | 3 +--
 src/java/org/apache/cassandra/hints/HintsStore.java            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0299769/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a088cfe..478fe08 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.3
+ * Remove checksum files after replaying hints (CASSANDRA-10947)
  * Support passing base table metadata to custom 2i validation (CASSANDRA-10924)
  * Ensure stale index entries are purged during reads (CASSANDRA-11013)
  * Fix AssertionError when removing from list using UPDATE (CASSANDRA-10954)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0299769/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java b/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
index 1dadf20..7782d5d 100644
--- a/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
@@ -246,8 +246,7 @@ final class HintsDispatchExecutor
 
                 if (dispatcher.dispatch())
                 {
-                    if (!file.delete())
-                        logger.error("Failed to delete hints file {}", descriptor.fileName());
+                    store.delete(descriptor);
                     store.cleanUp(descriptor);
                     logger.info("Finished hinted handoff of file {} to endpoint {}", descriptor.fileName(),
hostId);
                     return true;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0299769/src/java/org/apache/cassandra/hints/HintsStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hints/HintsStore.java b/src/java/org/apache/cassandra/hints/HintsStore.java
index 0fe582f..c066331 100644
--- a/src/java/org/apache/cassandra/hints/HintsStore.java
+++ b/src/java/org/apache/cassandra/hints/HintsStore.java
@@ -119,7 +119,7 @@ final class HintsStore
         }
     }
 
-    private void delete(HintsDescriptor descriptor)
+    void delete(HintsDescriptor descriptor)
     {
         File hintsFile = new File(hintsDirectory, descriptor.fileName());
         if (hintsFile.delete())


Mime
View raw message