Pigueiras commented on PR #10478: URL: https://github.com/apache/ozone/pull/10478#issuecomment-4689710947
Thanks for the review, really appreciated. I pushed an updated proposal here: https://github.com/Pigueiras/ozone/commit/488956cb522855ffdb773672324b19ed77902a47, not sure if it addresses everything you suggested. I tried to follow @peterxcli idea and added a `ContainerClientMetrics.Handle`, so `RpcClient` owns a handle for its metrics acquisition and closes that instead of calling `ContainerClientMetrics.release()` directly. I also tried to include @amaliujia point by making this release path idempotent, and by using `IOUtils.cleanupWithLogger(...)` so the rest of the close cleanup can still run if one step has a problem. Just to be transparent, this PR is AI-assisted. I understand the metrics double-release problem at a high level, but I'm not very familiar with the cleanup lifecycle here, so please feel free to suggest specific changes. Also totally fine if you think there's a simpler/faster way to handle it and want to steer this differently if you want to do a separate PR 😄 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
