zhuangchong commented on code in PR #6783:
URL: https://github.com/apache/paimon/pull/6783#discussion_r2606113667
##########
paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/HiveCatalogLock.java:
##########
@@ -63,11 +66,22 @@ public HiveCatalogLock(
@Override
public <T> T runWithLock(String database, String table, Callable<T>
callable) throws Exception {
- long lockId = lock(database, table);
+ Long lockId = null;
try {
+ lockId = lock(database, table);
Review Comment:
There are many possible causes for “hive lock may encounter deadlock”, for
example:
The first table task is still running, and subsequent tasks cannot acquire
the Hive table lock, leading to a timeout.
Delays in acquiring the Hive metastore lock, which also cause timeouts.
And so on.
In my latest changes:
Added detailed logs to show whether a lock acquisition failure was caused by
a timeout or by another lock state.
Fixed an issue where `lockResponse = clients.run(client ->
client.checkLock(lockId));` would throw an exception and the lock would not be
released, preventing subsequent tasks from acquiring the lock.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]