Uh oh!
There was an error while loading. Please reload this page.
stream: increase MAX_HWM - #29938
Conversation
595a301 to
21015cdCompareronag
commented
Oct 11, 2019
mcollina
left a comment
There was a problem hiding this comment.
Can you add some description/comments to the test? It would be more explicit to add some assertions as well.
1d5d383 to
310821fCompareronag
commented
Oct 12, 2019
Added simple description. Not sure what assertion would be relevant here? |
addaleax
left a comment
There was a problem hiding this comment.
Can you also add a test for file streams specifically, along the lines of the reproduction in the original issue?
Uh oh!
There was an error while loading. Please reload this page.
bc62925 to
0d228cbComparenodejs-github-bot
commented
Oct 13, 2019
Trott
commented
Oct 13, 2019
@nodejs/streams |
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Oct 14, 2019
Test failures look like this: Mismatched noop function calls. Expected exactly 1, actual 0. at Object.mustCall (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/common/index.js:337:10) at Object.<anonymous> (/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/parallel/test-stream-readable-read-max-hwm.js:29:20) at Module._compile (internal/modules/cjs/loader.js:958:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:994:10) at Module.load (internal/modules/cjs/loader.js:813:32) at Function.Module._load (internal/modules/cjs/loader.js:725:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1046:10) at internal/main/run_main_module.js:17:11 |
ronag
commented
Oct 15, 2019
@Trott: Picking another So though this fixes the referred issue it doesn't fix every issue. I will need to spend more time on this. |
@mcollina@addaleax I think fixing this is basically going to end up with almost identical behaviour as not having a MAX_HWM at all... I'm not sure what the rationale for MAX_HWM was. I need a little guidance on what we would prefer here:
|
mcollina
commented
Oct 19, 2019
I would recommend a scavenge in history in why there is a It would be good to do a git bisect to find out which commit broke this (likely is one of mine), so we would know more. |
03a686d to
d147179Compareronag
commented
Oct 20, 2019
@mcollina: Thanks. Didn't even consider removing it. Updated PR. |
b8288e5 to
3a63e31Compare4f0a6dd to
ba28187Compareronag
commented
Oct 20, 2019
@Trott: This is no longer WIP |
ronag
commented
Nov 1, 2019
@Trott: I think this is ready? |
nodejs-github-bot
commented
Nov 3, 2019
nodejs-github-bot
commented
Nov 5, 2019
nodejs-github-bot
commented
Nov 6, 2019
ronag
commented
Nov 11, 2019
@Trott ping |
nodejs-github-bot
commented
Nov 11, 2019
nodejs-github-bot
commented
Nov 12, 2019
Trott
commented
Nov 12, 2019
Landed in f8c069f. |
MAX_HWM was added in 9208c89 where the highwatermark was changed to always increase in steps of highest power of 2 to prevent increasing hwm excessivly in tiny amounts. Why a limit was added on the highwatermark is unclear but breaks existing usage where a larger read size is used. The invariant for read(n) is that a buffer of size n is always returned. Considering a maximum ceiling on the buffer size breaks this invariant. This PR significantly increases the limit to make it less likely to break the previous invariant and also documents the limit. Fixes: nodejs#29933 PR-URL: nodejs#29938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ronag
commented
Nov 13, 2019
@BridgeAR this should probably be backported to node 12? |
MAX_HWM was added in 9208c89 where the highwatermark was changed to always increase in steps of highest power of 2 to prevent increasing hwm excessivly in tiny amounts. Why a limit was added on the highwatermark is unclear but breaks existing usage where a larger read size is used. The invariant for read(n) is that a buffer of size n is always returned. Considering a maximum ceiling on the buffer size breaks this invariant. This PR significantly increases the limit to make it less likely to break the previous invariant and also documents the limit. Fixes: #29933 PR-URL: #29938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MAX_HWM was added in 9208c89 where the highwatermark was changed to always increase in steps of highest power of 2 to prevent increasing hwm excessivly in tiny amounts. Why a limit was added on the highwatermark is unclear but breaks existing usage where a larger read size is used. The invariant for read(n) is that a buffer of size n is always returned. Considering a maximum ceiling on the buffer size breaks this invariant. This PR significantly increases the limit to make it less likely to break the previous invariant and also documents the limit. Fixes: #29933 PR-URL: #29938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MAX_HWM was added in 9208c89 where the highwatermark was changed to always increase in steps of highest power of 2 to prevent increasing hwm excessivly in tiny amounts. Why a limit was added on the highwatermark is unclear but breaks existing usage where a larger read size is used. The invariant for read(n) is that a buffer of size n is always returned. Considering a maximum ceiling on the buffer size breaks this invariant. This PR significantly increases the limit to make it less likely to break the previous invariant and also documents the limit. Fixes: #29933 PR-URL: #29938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MAX_HWM was added in 9208c89 where the highwatermark was changed to always increase in steps of highest power of 2 to prevent increasing hwm excessivly in tiny amounts. Why a limit was added on the highwatermark is unclear but breaks existing usage where a larger read size is used. The invariant for read(n) is that a buffer of size n is always returned. Considering a maximum ceiling on the buffer size breaks this invariant. This PR significantly increases the limit to make it less likely to break the previous invariant and also documents the limit. Fixes: #29933 PR-URL: #29938 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MAX_HWM was added in 9208c89 where the highwatermark was changed to
always increase in steps of highest power of 2 to prevent increasing
hwm excessivly in tiny amounts.
Why a limit was added on the highwatermark is unclear but breaks
existing usage where a larger read size is used. The invariant for
read(n) is that a buffer of size n is always returned. Considering
a maximum ceiling on the buffer size breaks this invariant.
This PR significantly increases the limit to make it less likely to
break the previous invariant and also documents the limit.
Fixes: #29933
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes