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

[fix][broker] Fix the order of resource close in the InMemoryDelayedDeliveryTracker #18000

Merged

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Oct 11, 2022

Motivation

In the InMemoryDelayedDeliveryTracker, the priorityQueue should be closed after the timeout task is canceled, otherwise, we may operate the priorityQueue that has been closed.

Modifications

Close the priorityQueue after the timeout task is canceled and set timeout=null.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: coderzc#11

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

Can we add a test for it?

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@codelipenghui codelipenghui added this to the 2.12.0 milestone Oct 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@9281bbd). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #18000   +/-   ##
=========================================
  Coverage          ?   47.20%           
  Complexity        ?     6376           
=========================================
  Files             ?      367           
  Lines             ?    41173           
  Branches          ?     4216           
=========================================
  Hits              ?    19437           
  Misses            ?    19524           
  Partials          ?     2212           
Flag Coverage Δ
unittests 47.20% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@coderzc
Copy link
Member Author

coderzc commented Oct 12, 2022

/pulsarbot run-failure-checks

@coderzc coderzc force-pushed the fix_InMemoryDelayedDeliveryTracker_close branch from 8d09402 to bbba3bf Compare October 12, 2022 08:51
@coderzc
Copy link
Member Author

coderzc commented Oct 12, 2022

Can we add a test for it?

I add testClose method to cover this case.

@coderzc
Copy link
Member Author

coderzc commented Oct 13, 2022

/pulsarbot run-failure-checks

@codelipenghui codelipenghui merged commit 44ae348 into apache:master Oct 13, 2022
congbobo184 pushed a commit that referenced this pull request Nov 14, 2022
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 14, 2022
congbobo184 pushed a commit that referenced this pull request Nov 26, 2022
liangyepianzhou pushed a commit that referenced this pull request Dec 6, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Dec 6, 2022
…eliveryTracker (apache#18000)

(cherry picked from commit 44ae348)
(cherry picked from commit a9c67fa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants