apache / apache/gravitino

[Improvement] Possible thread issue in `LockManager.java`

Open
#1,938 3 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 15h
Merged PRs (30d)
315

Description

### What would you like to be improved?

Synchronizing on a parameter synchronizes not on the parameter itself, but on the object assigned to it. Two different threads running the method in parallel could pass two different object instances into the method as parameters, completely undermining the synchronization.

### How should we improve?

Investigate and improve

Contributor guide

Open the contributing guide

Research direction

Start by reading LockManager.java and identify the method that synchronizes on a parameter. Trace how that method is called and inspect any existing concurrency tests or test entry points. Done means the synchronization concern is resolved and concurrent behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.