yihua commented on code in PR #13836:
URL: https://github.com/apache/hudi/pull/13836#discussion_r2331648269
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/StorageBasedLockProvider.java:
##########
@@ -267,6 +268,18 @@ private synchronized void shutdown(boolean
fromShutdownHook) {
} catch (Exception e) {
logger.error("Owner {}: Heartbeat manager failed to close.", ownerId, e);
}
+ try {
+ this.auditService.ifPresent(auditService -> {
+ try {
+ auditService.close();
+ } catch (Exception e) {
+ logger.error("Owner {}: Audit service failed to close.", ownerId, e);
+ }
+ });
+ this.auditService = Option.empty();
+ } catch (Exception e) {
+ logger.error("Owner {}: Failed to close audit service.", ownerId, e);
+ }
Review Comment:
Should audit service also be closed if `fromShutdownHook=true`?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/StorageBasedLockProvider.java:
##########
@@ -463,6 +487,7 @@ private synchronized boolean tryExpireCurrentLock(boolean
fromShutdownHook) {
return false;
case SUCCESS:
logInfoLockState(RELEASED);
+ recordAuditOperation(AuditOperationState.END,
System.currentTimeMillis());
Review Comment:
Is there a need to audit other cases including `UNKNOWN_ERROR` and
`ACQUIRED_BY_OTHERS`?
--
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]