Skip to content

Commit

Permalink
Automated rollback of commit 618e5a2.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

This operation is supposed to be atomic. The windows flakiness should be addressed more
directly.

*** Original change description ***

Use FileSystemUtils.moveFile instead of renameTo function of Path

renameTo is sometimes flaky on Windows, moveFile is a more robust implementation.

Fixes #9995

RELNOTES: None
PiperOrigin-RevId: 274606746
  • Loading branch information
michajlo authored and copybara-github committed Oct 14, 2019
1 parent 1a1fca2 commit ac99c29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ private void writeServerStatusFiles(InetSocketAddress address) throws IOExceptio
info.writeTo(out);
}
Path serverInfoFile = serverDirectory.getChild(SERVER_INFO_FILE);
FileSystemUtils.moveFile(serverInfoTmpFile, serverInfoFile);
serverInfoTmpFile.renameTo(serverInfoFile);
deleteAtExit(serverInfoFile);
}

Expand Down

0 comments on commit ac99c29

Please sign in to comment.