huyuanfeng2018 opened a new issue, #6824: URL: https://github.com/apache/iceberg/issues/6824
### Apache Iceberg version None ### Query engine None ### Please describe the bug 🐞 When I use the hive catalog to manage the iceberg table, every time I take a snapshot, I will apply for the lock of the corresponding hive table and unlock it after the writing is completed, but when the unlock fails, no exception will be thrown, which will lead to the following A snapshot cycle can never acquire a lock, the task cannot continue to write, and the small file merge program cannot be called at the same time. Corresponding code to unlock : ``` private void unlock(Optional<Long> lockId) { if (lockId.isPresent()) { try { doUnlock(lockId.get()); } catch (Exception e) { LOG.warn("Failed to unlock {}.{}", database, tableName, e); } } } ``` get lock : ``` try { LockResponse response = metaClients.run(client -> client.checkLock(id)); LockState newState = response.getState(); state.set(newState); if (newState.equals(LockState.WAITING)) { throw new WaitingForLockException("Waiting for lock."); } } catch (InterruptedException e) { Thread.interrupted(); // Clear the interrupt status flag LOG.warn("Interrupted while waiting for lock.", e); } }, TException.class); ``` It seems that there is always this problem -- 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: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org