-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
readStream with highWaterMark causes 'data' event to miss data #33940
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
stream
Issues and PRs related to the stream subsystem.
Comments
markwylde
changed the title
readStream with highWaterMark causes data to go missing
readStream with highWaterMark causes 'data' event to miss data
Jun 18, 2020
targos
added
fs
Issues and PRs related to the fs subsystem / file system.
stream
Issues and PRs related to the stream subsystem.
labels
Dec 27, 2020
helloyou2012
added a commit
to helloyou2012/node
that referenced
this issue
Apr 19, 2021
See #38292,
|
helloyou2012
added a commit
to helloyou2012/node
that referenced
this issue
Apr 19, 2021
helloyou2012
added a commit
to helloyou2012/node
that referenced
this issue
Apr 20, 2021
helloyou2012
added a commit
to helloyou2012/node
that referenced
this issue
Apr 20, 2021
helloyou2012
added a commit
to helloyou2012/node
that referenced
this issue
Apr 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
stream
Issues and PRs related to the stream subsystem.
Explanation?
The code below will constantly append to a file (
/tmp/test.txt
) and constantly read the file, pushing the data into an in-memory buffer. This is essentially a "tail".After a few iterations, we eventually dirty the buffer with incorrect data, as the 'data' event does not contain the correct data.
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time
What is the expected behaviour?
The file would never end, and every line in the buffer would start with 'hello'
What do you see instead?
The output reads:
Note, the last line should be
hello at 26
Additional information
/tmp/test.txt
file and the data is as expected.The text was updated successfully, but these errors were encountered: