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

[Bug] Releasing lock in Future.whenComplete() may lead to the lock not being properly released when using ThreadPoolExecutor with DiscardOldestPolicy. #8877

Open
3 tasks done
qianye1001 opened this issue Oct 30, 2024 · 0 comments · May be fixed by #8916

Comments

@qianye1001
Copy link
Contributor

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

any

RocketMQ version

any

JDK Version

any

Describe the Bug

Releasing lock in Future.whenComplete() may lead to the lock not being properly released when using ThreadPoolExecutor with DiscardOldestPolicy.

look this function:

org.apache.rocketmq.proxy.common.ReceiptHandleGroup#computeIfPresent

Steps to Reproduce

  1. ConsumerProcessorExecutor's queue is full
  2. Submit a new task to ConsumerProcessorExecutor and discard oldest inner renew task
  3. handleData.unlock() can not be reached
  4. handle will never be removed

What Did You Expect to See?

unlock properly

What Did You See Instead?

can not release lock

Additional Context

No response

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