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

simplify ack/nack handling #912

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Conversation

bollhals
Copy link
Contributor

Proposed Changes

There are three main changes here:

  • Cleans up some unused methods in AutorecoveringModel / ExtensionMethods
  • Avoids allocating a BasicAckEventArgs / BasicNackEventArgs if there is no handler.
  • Changes HandleAckNack to call _deliveryTagsCountdown.Signal(count); instead of repeatedly _deliveryTagsCountdown.Signal()

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)

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

Allocations before:
image

After:
image

Performance before: (consider both methods as it got inlined HandleBasicAck & handleAckNack)
image

after:
image

@michaelklishin michaelklishin merged commit 2e20a8f into rabbitmq:master Jul 10, 2020
michaelklishin added a commit that referenced this pull request Jul 10, 2020
simplify ack/nack handling

(cherry picked from commit 2e20a8f)
michaelklishin added a commit that referenced this pull request Jul 12, 2020
@lukebakken lukebakken added this to the 7.0.0 milestone Jul 13, 2020
@bollhals bollhals deleted the ackHandling branch March 2, 2021 20:49
@lukebakken lukebakken modified the milestones: 8.0.0, 7.0.0 Mar 8, 2022
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