Skip to content

[core] Avoid deadlocks between concurrent JDBC catalog renames - #11342

Open
zhangyue19921010 wants to merge 1 commit into
apache:masterfrom
zhangyue19921010:contrib/fix-jdbc-rename-stripe-lock-order
Open

zhangyue19921010 wants to merge 1 commit into
apache:masterfrom
zhangyue19921010:contrib/fix-jdbc-rename-stripe-lock-order

Conversation

@zhangyue19921010

Copy link
Copy Markdown
Contributor

Purpose

Fixes #11341.

Concurrent JDBC catalog renames of different objects can acquire the same two local lock stripes in opposite order and deadlock. Acquire local stripes in stripe order before entering the existing identifier order for distributed locks. Table and view renames share this helper.

Tests

Added a deterministic regression using real JDBC catalog table renames with colliding stripes. It fails on unchanged production code and passes after the fix.

Ran the regression and neighboring catalog/view, lease and executor serialization tests: 111 pass with normal Maven checks and RAT (JDK 11, Java 8 source target).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Concurrent JDBC catalog renames can deadlock on local lock stripes

1 participant