[UWS,TAP] Fix the backup file writing.
Instead of writing the new backup content in the final backup file directly, write it first in a temporary file and then change the files name. This fix prevents incomplete backup files (particularly in case of one backup file per user) when stopping/restarting by force.
Showing
- src/uws/service/file/LocalUWSFileManager.java 66 additions, 60 deletionssrc/uws/service/file/LocalUWSFileManager.java
- src/uws/service/file/io/CloseAction.java 44 additions, 0 deletionssrc/uws/service/file/io/CloseAction.java
- src/uws/service/file/io/OutputStreamWithCloseAction.java 102 additions, 0 deletionssrc/uws/service/file/io/OutputStreamWithCloseAction.java
- src/uws/service/file/io/RotateFileAction.java 90 additions, 0 deletionssrc/uws/service/file/io/RotateFileAction.java
- test/uws/service/file/io/TestOutputStreamWithCloseAction.java 103 additions, 0 deletions.../uws/service/file/io/TestOutputStreamWithCloseAction.java
- test/uws/service/file/io/TestRotateFileAction.java 161 additions, 0 deletionstest/uws/service/file/io/TestRotateFileAction.java
Loading
Please register or sign in to comment