Skip to content
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

Should we transition to Open state when recv even MAX_STREAM_DATA or RST on idle #572

Closed
siyengar opened this issue Jun 4, 2017 · 3 comments
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@siyengar
Copy link

siyengar commented Jun 4, 2017

While thinking about implementation of the handling of idle state, it seems like we'd practically allocate the stream state object anyway if we get a MAX_STREAM_DATA or STREAM_BLOCKED (to keep track of flow control).

It seems better then to treat these streams as equivalent to Open streams because it'd simplify the logic of deciding the Stream limit count to advertise. If the reason we want to allow this transition is to deal with lost packets, we'd practically allocate the stream data eventually when the packets are recovered.

Proposing a change where:

Idle -> Open

transition occurs not only on STREAM, but also BLOCKED, MAX_STREAM_DATA as well.

@siyengar
Copy link
Author

siyengar commented Jun 4, 2017

This also has the nice side effect of causing the lower order streams to be opened as well.

Thinking about it a bit more, we should do this for RST on idle streams as well.

Currently if we get a RST on an idle stream, we do:
idle -----> half closed

however this means that if stream 10 is RST, we didnt really open stream 1 - 10. Then if stream 20 is opened, we would have no idea if stream 10 was opened before or rst, so we'd have to keep track of all RST streams.

seems nicer to make this more symmetric with the stream open case:

I propose that when getting a RST on an idle stream we first move it into open state and then process the RST so that we get the lower streams opened as well, i.e. if we get a rst on an idle stream, we do the following transitions:

idle ------> (open) -------> half closed

@siyengar siyengar changed the title Should we transition to Open state when recv even MAX_STREAM_DATA Should we transition to Open state when recv even MAX_STREAM_DATA or RST on idle Jun 4, 2017
@marten-seemann
Copy link
Contributor

Opening streams as soon as you hear from them (no matter in which frame type) definitely makes sense (and is what quic-go is already doing). It avoids a whole bunch of edge cases that are only needed to deal with reordered packets.

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -transport labels Jun 5, 2017
@martinthomson martinthomson added this to Streams in QUIC Jun 5, 2017
martinthomson added a commit that referenced this issue Jun 10, 2017
This corrects a few infidelities about the way that stream states
update.  This includes Subodh's excellent suggestion to limit
transitions from idle to only go through open.

Fixes #572, #571.
@janaiyengar
Copy link
Contributor

This is a side-effect of the change to opening all lower number streams automagically. Since we're doing auto-opening, it makes sense to do this.

@mnot mnot removed this from Streams in QUIC Jun 21, 2017
@mnot mnot added the has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

No branches or pull requests

5 participants