fix(logs): synchronise log file rotation and compression.#4417
Conversation
|
Lots of CI failures, something is not right |
|
Unit test that I wrote is still timing sensitive. Log rotation, purge and compression has some design flaws. I wanted to check with you if the approach in draft PR is good enough as temporary improvement. |
77fbb1a to
90138c7
Compare
|
The PR was updated: file being compressed is prefixed with Purge procedure was updated to sort log files names in ascending order before comparing last modification times. File with alphabetically larger file name is therefore taken in cases when multiple files have identical modification time. It looks like the combination of mutex, renaming the compressed file and ordering files in purge process solves the issue. I was not able to reproduce anymore. |
727a62f to
322a649
Compare
cd9dc00 to
72496f9
Compare
|
PR is ready to be reviewed. The reason for failed task on Windows is missing compile flags for C++17 in VS files and that was resolved on branch "4368-oracle-odbc-tests". |
|
moved this to 1.14 (interface changes and still some CI errors) |
72496f9 to
51f8b0b
Compare
This PR solves log file naming when compression is enabled by locking log file name rotation and compression with a mutex.
The file being compressed is renamed by prefixing to be skipped by purge. The prefix is removed at the end of compression procedure.
Purge strategy also interferes with this process and might have to be included in this locking process.