abdullah alamoudi has submitted this change and it was merged. Change subject: [NO ISSUE][OBS] Log content of index dir with missing checkpoints ......................................................................
[NO ISSUE][OBS] Log content of index dir with missing checkpoints - user model changes: no - storage format changes: no - interface changes: no Details: - When an index is missing checkpoint file, it should contain the mask and gets cleaned up on bootstrap. when that doesn't happen, we should log the content of the dir to help investigating. Change-Id: I1903a40e129f648d4a0f8be6e820c6d45c722bec Reviewed-on: https://asterix-gerrit.ics.uci.edu/2801 Sonar-Qube: Jenkins <[email protected]> Reviewed-by: abdullah alamoudi <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Anon. E. Moose #1000171: abdullah alamoudi: Looks good to me, but someone else must approve Jenkins: Verified; No violations found; ; Verified Murtadha Hubail: Looks good to me, approved diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java index c1a81a3..64d8e93 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java @@ -27,6 +27,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.Optional; @@ -141,6 +142,8 @@ throw HyracksDataException.create(e); } if (checkpoints.isEmpty()) { + LOGGER.warn("Couldn't find any checkpoint file for index {}. Content of dir are {}.", indexPath, + Arrays.toString(indexPath.toFile().listFiles())); throw new IllegalStateException("Couldn't find any checkpoints for resource: " + indexPath); } checkpoints.sort(Comparator.comparingLong(IndexCheckpoint::getId).reversed()); -- To view, visit https://asterix-gerrit.ics.uci.edu/2801 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1903a40e129f648d4a0f8be6e820c6d45c722bec Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]>
