tedyu commented on code in PR #12801:
URL: https://github.com/apache/iceberg/pull/12801#discussion_r2049743332


##########
flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/TriggerManager.java:
##########
@@ -189,6 +189,9 @@ public void initializeState(FunctionInitializationContext 
context) throws Except
     this.recoveryLock = lockFactory.createRecoveryLock();
     if (context.isRestored()) {
       shouldRestoreTasks = true;
+    } else {

Review Comment:
   Looking at the code in JdbcLockFactory#unlock:
   ```
         } catch (InterruptedException e) {
           Thread.currentThread().interrupt();
           throw new UncheckedInterruptedException(e, "Interrupted during 
unlock");
         } catch (SQLException e) {
           // SQL exception happened when getting/updating lock information
           throw new UncheckedSQLException(e, "Failed to remove lock %s", this);
   ```
   I wonder if `lock.unlock();` should be wrapped in try/finally block so that 
`recoveryLock.unlock()` is always executed.



-- 
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

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

Reply via email to