Skip to content

Commit

Permalink
refactor(snapshot): remove useless atomic move
Browse files Browse the repository at this point in the history
(cherry picked from commit a717b5e)
  • Loading branch information
npepinpe authored and github-actions[bot] committed Oct 19, 2023
1 parent 21ab145 commit e40a0be
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,7 @@ FileBasedSnapshot persistNewSnapshot(
checksumPath.resolveSibling(checksumPath.getFileName().toString() + TMP_CHECKSUM_SUFFIX);
try {
SnapshotChecksum.persist(tmpChecksumPath, immutableChecksumsSFV);
Files.move(tmpChecksumPath, checksumPath, StandardCopyOption.ATOMIC_MOVE);
FileUtil.flushDirectory(snapshotsDirectory);
FileUtil.moveDurably(tmpChecksumPath, checksumPath);
} catch (final IOException e) {
rollbackPartialSnapshot(destination);
throw new UncheckedIOException(e);
Expand Down

0 comments on commit e40a0be

Please # to comment.