Skip to content

Commit

Permalink
HBASE-28575 Always printing error log when snapshot table (#5880)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 2a7aa0d)
  • Loading branch information
guluo2016 authored and Apache9 committed May 8, 2024
1 parent 0131700 commit 65e4f38
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ public void process() {
try {
// if the working dir is still present, the snapshot has failed. it is present we delete
// it.
if (!workingDirFs.delete(workingDir, true)) {
LOG.error("Couldn't delete snapshot working directory:" + workingDir);
if (workingDirFs.exists(workingDir) && !workingDirFs.delete(workingDir, true)) {
LOG.error("Couldn't delete snapshot working directory: {}", workingDir);
}
} catch (IOException e) {
LOG.error("Couldn't delete snapshot working directory:" + workingDir);
LOG.error("Couldn't get or delete snapshot working directory: {}", workingDir, e);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Table snapshot journal : \n" + status.prettyPrintJournal());
Expand Down

0 comments on commit 65e4f38

Please sign in to comment.