[X] I had searched in the issues and found no similar issues.
Version
v1.2.662-nightly
What's Wrong?
A test case reports a failure where two queries simultaneously hold locks for the same table. The root cause is that the create_lock_revision process lacks atomicity between the two operations: generating a new revision and inserting that revision into the lock key list. This non-atomic behavior allows two queries to independently acquire revisions and insert them into the list without proper synchronization, leading to both queries believing they own the lock.
Search before asking
Version
v1.2.662-nightly
What's Wrong?
A test case reports a failure where two queries simultaneously hold locks for the same table. The root cause is that the create_lock_revision process lacks atomicity between the two operations: generating a new revision and inserting that revision into the lock key list. This non-atomic behavior allows two queries to independently acquire revisions and insert them into the list without proper synchronization, leading to both queries believing they own the lock.
How to Reproduce?
https://github.com/databendlabs/databend/actions/runs/11947873485/job/33305193605
Are you willing to submit PR?