Skip to content

Commit

Permalink
[core] Fix the race condition in OrphanFilesClean (#3165)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi authored Apr 8, 2024
1 parent 676c829 commit f3f7008
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ private List<Path> filterAndCleanDataDirs(
.forEach(
p -> {
deleteFileOrDirQuietly(p);
deleteFiles.add(p);
deletedFilesNum++;
synchronized (this) {
deleteFiles.add(p);
deletedFilesNum++;
}
});
}

Expand Down

0 comments on commit f3f7008

Please sign in to comment.