Skip to content
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

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

marten-seemann
Copy link
Collaborator

@marten-seemann marten-seemann commented Apr 16, 2020

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.

@marten-seemann marten-seemann force-pushed the qlog-tmp-file branch 3 times, most recently from d81e7f5 to 4b7d42b Compare April 16, 2020 07:04
@Stebalien Stebalien merged commit 7bbb1a2 into master Apr 17, 2020
@Stebalien Stebalien deleted the qlog-tmp-file branch April 17, 2020 04:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows doesn't like our qlog file names
2 participants