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

buffer stream signals #284

Merged
merged 4 commits into from
May 23, 2024
Merged

Conversation

qzhuyan
Copy link
Collaborator

@qzhuyan qzhuyan commented May 21, 2024

QUIC stream data is ensured ordered and lossless during stream handoff from old owner process to the new owner process.

This PR makes QUIC stream signals also ordered so that old owner does not need to take care of the inflight messages during the handoff.

The new quicer_owner_queue things could be reused to later implement the sig queues for the quic connections.

@qzhuyan qzhuyan force-pushed the dev/william/buffer-stream-signals branch from 25871a9 to d100ce6 Compare May 22, 2024 07:27
@coveralls
Copy link

coveralls commented May 22, 2024

Pull Request Test Coverage Report for Build 9207770123

Details

  • 95 of 104 (91.35%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on dev/william/buffer-stream-signals at 86.796%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/quicer.erl 1 2 50.0%
src/quicer_nif.erl 0 3 0.0%
c_src/quicer_stream.c 64 69 92.75%
Totals Coverage Status
Change from base Build 9193963012: 86.8%
Covered Lines: 3885
Relevant Lines: 4476

💛 - Coveralls

@qzhuyan qzhuyan force-pushed the dev/william/buffer-stream-signals branch from d100ce6 to 09c3d0c Compare May 22, 2024 10:29
c_src/quicer_owner_queue.c Outdated Show resolved Hide resolved
@qzhuyan qzhuyan force-pushed the dev/william/buffer-stream-signals branch from 09c3d0c to d24a795 Compare May 23, 2024 11:36
@qzhuyan qzhuyan force-pushed the dev/william/buffer-stream-signals branch from d24a795 to a2a9aa9 Compare May 23, 2024 12:14
@qzhuyan qzhuyan changed the title Dev/william/buffer stream signals buffer stream signals May 23, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Might need a copyright header in this file.

),
ok = quicer:controlling_process(S, self()),
{ok, NewOwner} = quicer:get_stream_owner(S),
NewOwner = self(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: isn't the owner self() in the first place, so that controlling_process doesn't change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

quicer:controlling_process will not skip owner change even when old owner is the new owner.

The point in this test is quicer_nif:mock_buffer_sig(S, Pid, {Ref, Term}) simulates the {Ref, Term} is supposed to be sent to the Pid.

@qzhuyan qzhuyan merged commit 8dbdef7 into emqx:main May 23, 2024
32 checks passed
@qzhuyan qzhuyan deleted the dev/william/buffer-stream-signals branch October 21, 2024 17:46
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.

3 participants