This repository has been archived by the owner on May 26, 2022. It is now read-only.
write qlogs to a temporary file first, then rename them when done #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my tests on the staging server, I get a bunch of invalid
.qlog.gz
files. I assume the reason is that these are connections that are still active, and the log file is still being written.It makes sense to use a different file name when writing the file. I chose the same naming scheme as vim, i.e. the temporary file for
log.qlog.gz
is.log.qlog.gz.swp
(in the same directory). I'd be happy to change this to something different, if you have any suggestions.This PR also uncovered that Windows doesn't like the file names of our qlog files (see #137). This went undetected because so far we didn't have a unit test that actually performed file system access.
This PR also fixes #137.