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 — Use real, instead of synthetic, HTTP/2 stream id by chrisvest · Pull Request #15842 · netty/netty Conversation
|
|
|
||
| closePromise = pipeline.newPromise(); | ||
| channelId = new Http2StreamChannelId(parent().id(), id); | ||
| channelId = new Http2StreamChannelId(parent().id(), stream.id()); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This was actually done by design as stream.id() will return -1 until a header frame was send or received and only after that change.
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.
Can we then pass stream down to Http2StreamChannelId and it will return -1 until a real id is assigned?
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.
ChannelId instances are meant to be immutable because they're used as keys on maps.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reverts commit 1ebed73.
|
In that case we can amend the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@chrisvest LGTM... Please squash and adjust commit message and pull in . |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @Override | ||
| public String toString() { | ||
| return parent().toString() + "(H2 - " + stream + ')'; | ||
| return parent().toString() + '/' + channelId.getSequenceId() + " (H2 - " + stream + ')'; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That will be more confusing and break existing parsers for channel.toString() that extract id and local/remote addresses
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.
What are these parsers? Are you thinking splunk queries, or is there some data in here you'd rather have a getter method for?
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.
Also honestly nobody should depend on toString() formatting to be stable...
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.
Actually, I misread it. I assumed that new format will be [id: 0xaa5dbac4/1, L:/127.0.0.1:52093 - R:/127.0.0.1:52094](H2 - 3) but it actually will be [id: 0xaa5dbac4, L:/127.0.0.1:52093 - R:/127.0.0.1:52094]/1(H2 - 3). In this case, it should not break anyone.
I agree that ideally ppl should not depend on it, but in reality they do. And the separators are not a problem, the problem could be if id changes from 0xaa5dbac4 to 0xaa5dbac4/1
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.
We should be good based on the above comment: https://github.com/netty/netty/pull/15842/files#r2538137668
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Motivation: The `AbstractHttp2StreamChannel` subclasses use a synthetic id in their `ChannelId`, but include the real stream id in their `toString()` method. Using two different ids makes it harder to correlate the two in logs. The synthetic ids are necessary because the stream id is assigned at a protocol level at some point after the channel has been created. Modification: Include the synthetic id in the `AbstractHttp2StreamChannel.toString()` output. Result: Easier to correlate HTTP/2 channel and stream ids, to help with debugging. (cherry picked from commit d01673a)
Motivation: The `AbstractHttp2StreamChannel` subclasses use a synthetic id in their `ChannelId`, but include the real stream id in their `toString()` method. Using two different ids makes it harder to correlate the two in logs. The synthetic ids are necessary because the stream id is assigned at a protocol level at some point after the channel has been created. Modification: Include the synthetic id in the `AbstractHttp2StreamChannel.toString()` output. Result: Easier to correlate HTTP/2 channel and stream ids, to help with debugging.
Motivation: The `AbstractHttp2StreamChannel` subclasses use a synthetic id in their `ChannelId`, but include the real stream id in their `toString()` method. Using two different ids makes it harder to correlate the two in logs. The synthetic ids are necessary because the stream id is assigned at a protocol level at some point after the channel has been created. Modification: Include the synthetic id in the `AbstractHttp2StreamChannel.toString()` output. Result: Easier to correlate HTTP/2 channel and stream ids, to help with debugging.
Motivation: The `AbstractHttp2StreamChannel` subclasses use a synthetic id in their `ChannelId`, but include the real stream id in their `toString()` method. Using two different ids makes it harder to correlate the two in logs. The synthetic ids are necessary because the stream id is assigned at a protocol level at some point after the channel has been created. Modification: Include the synthetic id in the `AbstractHttp2StreamChannel.toString()` output. Result: Easier to correlate HTTP/2 channel and stream ids, to help with debugging. (cherry picked from commit d01673a)
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.