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

Removed assert to check finalize is called before drop #1703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boserohan
Copy link

Removed the debug_assert statement in fn finalize_inner() for checking finalize is called before drop on Chunks. Also removed the boolean 'drop' variable used for this check.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good, thanks! It would be nice to extend the documentation around this type to explain what finalize() does and what happens if it's not called.

@boserohan
Copy link
Author

Thanks for reviewing. Sure, can you please point me to the location in the docs where I can make those changes?

@djc
Copy link
Member

djc commented Nov 6, 2023

Just the docstrings for the relevant methods.

@boserohan
Copy link
Author

To me it seems finalize() needs to be called whenever all chunks of data available to the receiver on a given stream have been read (i.e. stream is finished or reset). Hence, disposing it's stored state. This might also involve situations where the sender is blocked due to flow control limits, and thus preventing the stream from being stalled by additionally granting these credits to the sender, and notifying the QUIC state machine that a frame needs to be transmitted for the same. Is my understanding correct with this? If not, please could you correct me if I am wrong.

@boserohan
Copy link
Author

@djc can you help my understanding on this please?

@djc
Copy link
Member

djc commented Nov 20, 2023

@boserohan91 I don't have much time right now to dig into this. I suggest just updating your PR with some documentation based on your understanding and we'll review the suggested changes to see if they make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants