GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — fs: use correct position when retrying writev by christianaurichzm · Pull Request #66203 · nodejs/node Conversation
Member
For a 12-byte batch starting at 0, with the first call writing 3 bytes: The second call should be at 3. The current result is:
Pass The regression test covers partial writes at For
Refs: #49211
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionswritevAll() tracks the position for the next attempt in its `pos` argument, but calls fs.writev() with `this.pos`. WriteStream._writev() advances `this.pos` by the whole batch right after starting the write, so a retry from the asynchronous callback resumes at the end of the batch instead of after the bytes that reached the file. A partial write leaves a hole and puts the remainder past its place; an EAGAIN retry moves forward even though nothing was written. Use the local `pos`, as writeAll() already does. Signed-off-by: Christian Aurich Zanettini Martins <[email protected]>
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #66203 +/- ## ======================================= Coverage 90.29% 90.29% ======================================= Files 790 790 Lines 272529 272529 Branches 52031 52033 +2 ======================================= + Hits 246083 246089 +6 + Misses 16909 16897 -12 - Partials 9537 9543 +6
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@atlowChemi since you finished |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ronag, since |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Failed to start CIFull Auto Start CI output |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 2e59a6d |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
writevAll() tracks the position for the next attempt in its `pos` argument, but calls fs.writev() with `this.pos`. WriteStream._writev() advances `this.pos` by the whole batch right after starting the write, so a retry from the asynchronous callback resumes at the end of the batch instead of after the bytes that reached the file. A partial write leaves a hole and puts the remainder past its place; an EAGAIN retry moves forward even though nothing was written. Use the local `pos`, as writeAll() already does. Signed-off-by: Christian Aurich Zanettini Martins <[email protected]> PR-URL: #66203 Refs: #49211 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
writevAll() tracks the position for the next attempt in its `pos` argument, but calls fs.writev() with `this.pos`. WriteStream._writev() advances `this.pos` by the whole batch right after starting the write, so a retry from the asynchronous callback resumes at the end of the batch instead of after the bytes that reached the file. A partial write leaves a hole and puts the remainder past its place; an EAGAIN retry moves forward even though nothing was written. Use the local `pos`, as writeAll() already does. Signed-off-by: Christian Aurich Zanettini Martins <[email protected]> PR-URL: nodejs#66203 Refs: nodejs#49211 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.