danny0405 commented on code in PR #19741:
URL: https://github.com/apache/hudi/pull/19741#discussion_r3859312851
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/BaseZookeeperBasedLockProvider.java:
##########
@@ -162,9 +162,10 @@ public void close() {
lock.release();
lock = null;
}
- this.curatorFrameworkClient.close();
} catch (Exception e) {
log.error(generateLogStatement(LockState.FAILED_TO_RELEASE,
generateLogSuffixString()));
+ } finally {
+ this.curatorFrameworkClient.close();
Review Comment:
Could we add focused regression coverage for the reported failure path?
Please make `lock.release()` throw, call
`BaseZookeeperBasedLockProvider.close()`, and verify that
`curatorFrameworkClient.close()` is still invoked (or that the client reaches
`STOPPED`). Without exercising the release exception, the original leaking
implementation would pass the same tests.
--
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]