Skip to content

Commit

Permalink
[BEAM-7877] Change the log level when deleting unknown temoprary file…
Browse files Browse the repository at this point in the history
…s in FileBasedSink

Currently the log level is info. A new proposed log level is warning
since deleting unknown temporary files is a bad sign and sometimes leads
to data loss.
  • Loading branch information
ihji committed Aug 2, 2019
1 parent 20bb131 commit b5e4175
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,10 @@ final void removeTemporaryFiles(
FileSystems.match(Collections.singletonList(tempDir.toString() + "*")));
for (Metadata matchResult : singleMatch.metadata()) {
if (allMatches.add(matchResult.resourceId())) {
LOG.info("Will also remove unknown temporary file {}", matchResult.resourceId());
LOG.warn(
"Will also remove unknown temporary file {}. This might indicate that other process/job is using "
+ "the same temporary folder and result in data consistency issues.",
matchResult.resourceId());
}
}
} catch (Exception e) {
Expand Down

0 comments on commit b5e4175

Please sign in to comment.