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

Report a ReentrantShortLock that holds a lock for a long time. #6040

Open
ikhoon opened this issue Dec 17, 2024 · 0 comments
Open

Report a ReentrantShortLock that holds a lock for a long time. #6040

ikhoon opened this issue Dec 17, 2024 · 0 comments
Milestone

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Dec 17, 2024

ReentrantShortLock is designed to allow a locking operation in non-blocking threads. ReentrantShortLock is used cautiously when an operation is finished quickly. It is excluded from the BlockHound rule to avoid false positive reports.

builder.allowBlockingCallsInside("com.linecorp.armeria.internal.common.util.ReentrantShortLock",
"lock");

This causes another issue where a long lock acquisition in ReentrantShortLock is not detected.
To solve this problem, it would be nice if there was a way to notify through a warning or metric if ReentrantShortLock is occupying the lock for more than a certain amount of time. (Suggested by @jrhee17)

@ikhoon ikhoon added this to the 1.32.0 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant