-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qlog: defer creation of the qlog file in QLOGDIR until the first write
If the syscall to create the qlog file takes a non-negligible amount of time, this can block the connection's run loop, or, even worse, the server's run loop. By creating the qlog file on the first write, it will be created by a the qlogger's Go routine, and not be able to block the run loop. The qlogger uses a buffered channel (capacity: 50). The qlogger will therefore only block if more than 50 qlog events are queued before the syscall returns.
- Loading branch information
1 parent
dc49f56
commit 6991981
Showing
1 changed file
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters