asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhub...@apache.org
Subject asterixdb git commit: [ASTERIXDB-2072][STO] Do Not Delete Checkpoints on ClosedByInterruptException
Date Sat, 26 Aug 2017 18:36:49 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master d2f4fbf9f -> 00ce8748c


[ASTERIXDB-2072][STO] Do Not Delete Checkpoints on ClosedByInterruptException

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- On ClosedByInterruptException, don't delete checkpoints since
  they are not corrupted.

Change-Id: I7581eb15558dd656d9e2de1469845371dcc13e4b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1975
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/master
Commit: 00ce8748cd68ba0ffa3dd74b5c1b976d054a19ca
Parents: d2f4fbf
Author: Murtadha Hubail <mhubail@apache.org>
Authored: Fri Aug 25 21:47:13 2017 -0700
Committer: Murtadha Hubail <mhubail@apache.org>
Committed: Sat Aug 26 11:36:19 2017 -0700

----------------------------------------------------------------------
 .../management/service/recovery/AbstractCheckpointManager.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/00ce8748/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java
b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java
index 24d316b..2a075f1 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/AbstractCheckpointManager.java
@@ -23,6 +23,7 @@ import java.io.File;
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.channels.ClosedByInterruptException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -91,6 +92,10 @@ public abstract class AbstractCheckpointManager implements ICheckpointManager
{
                 LOGGER.log(Level.WARNING, "Reading checkpoint file: " + file.getAbsolutePath());
                 String jsonString = new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())));
                 checkpointObjectList.add(Checkpoint.fromJson(jsonString));
+            } catch (ClosedByInterruptException e) {
+                Thread.currentThread().interrupt();
+                LOGGER.log(Level.WARNING, "Interrupted while reading checkpoint file: " +
file.getAbsolutePath(), e);
+                throw new ACIDException(e);
             } catch (IOException e) {
                 // ignore corrupted checkpoint file
                 LOGGER.log(Level.WARNING, "Failed to read checkpoint file: " + file.getAbsolutePath(),
e);


Mime
View raw message