-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAX_WRITE can cause messages to split #96
Comments
PR with tests? |
ronag
added a commit
to ronag/sonic-boom
that referenced
this issue
Aug 26, 2021
ronag
added a commit
to ronag/sonic-boom
that referenced
this issue
Aug 26, 2021
ronag
added a commit
to ronag/sonic-boom
that referenced
this issue
Aug 26, 2021
ronag
added a commit
to ronag/sonic-boom
that referenced
this issue
Aug 26, 2021
ronag
added a commit
to ronag/sonic-boom
that referenced
this issue
Aug 26, 2021
Merged
mcollina
added a commit
that referenced
this issue
Aug 27, 2021
* fix: ensure writes are always atomic Fixes: #96 * fixup * fixup * fixup * fixup * fixup * fixup * fixup * fixup * fixup * fixup * Added test for large async atomic writes * Performance improvements * typo Co-authored-by: Robert Nagy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Due to MAX_WRITE a call to
write
is not guaranteed to be atomic, i.e. it can be split into multiple writes. This in combination with child processes can cause the parent process to interleave incomplete messages from different child processes.I believe this should be possible to resolve by checking against
MAX_WRITE
before appending tothis._buf
.Refs: pinojs/pino#1098
The text was updated successfully, but these errors were encountered: