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

change InboundFrame to a class #1613

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

bollhals
Copy link
Contributor

Proposed Changes

Changes the InboundFrame to a class instead of a readonly struct. There's only ever one frame active per connection, hence it can be a class that is allocated once and then reused.

benefits

  • Simplifies handling of the type, as classes are easier to handle than struct (e.g. avoid struct copies, async incompatibilities around in).
  • Most likely improves performance very slightly, but unable to provide evidence, as it's within the error margin.
  • Simplifies handling of the rented memory, as the array can now be nulled out

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Performance / Simplification change

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

There's a bugfix in here as well, if wanted, I can submit that separately. see my comments.

@lukebakken lukebakken self-requested a review June 25, 2024 19:21
@lukebakken lukebakken self-assigned this Jun 25, 2024
@lukebakken lukebakken added this to the 7.0.0 milestone Jun 25, 2024
@lukebakken lukebakken marked this pull request as draft June 25, 2024 19:25
@lukebakken
Copy link
Contributor

@bollhals I converted this PR to a draft. Feel free to click "Ready for review" when you're done.

Thank you for this contribution!

@bollhals bollhals marked this pull request as ready for review June 25, 2024 19:54
@bollhals
Copy link
Contributor Author

@bollhals I converted this PR to a draft. Feel free to click "Ready for review" when you're done.

Thank you for this contribution!

It's ready. It was just some whitespace formatting issue. (My settings are different than what's expected here)

* Improve `TakeoverPayload`
* Use `RentedMemory` and define more constants
* Use explicit types instead of `var`
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

Thank you! I will merge once CI passes and will release RC.3

@lukebakken lukebakken merged commit 56b3ebf into rabbitmq:main Jun 26, 2024
11 checks passed
@stebet
Copy link
Contributor

stebet commented Jun 26, 2024

Nice!

@bollhals bollhals deleted the fix/InboundFrame branch June 26, 2024 21:11
@bollhals
Copy link
Contributor Author

Thank you! I will merge once CI passes and will release RC.3

Just FYI, I have currently a bit of spare time (again after some busy years^^) and plan to push a few updates. (Up to you to include it them in whatever version you see fit 👍 (Another RC or 7.x or even 8))

@lukebakken
Copy link
Contributor

@bollhals thank you, I will keep an eye out. I would like to get version 7 released soon but am happy to wait on your contributions.

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