You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Anurag Parvatikar (Jira)" <ji...@apache.org> on 2026/09/29 06:35:00 UTC
[jira] [Comment Edited] (HDDS-16404) Remove deprecated finalize() in java.lang.Object
[ https://issues.apache.org/jira/browse/HDDS-16404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120553#comment-18120553 ]
Anurag Parvatikar edited comment on HDDS-16404 at 9/29/26 6:34 AM:
-------------------------------------------------------------------
Hi [~adoroszlai] , I'd like to get your perspective on handling resource cleanup on the client side.
Currently, {{{}OzFs{}}}, {{{}RootedOzFs{}}}, and {{BasicOzFs}} use {{finalize}} to close underlying resources via {{{}fsImpl.close(){}}}. This differs from the server-side pattern, where {{finalize}} is primarily used to track resource leaks.
While we can replace {{finalize}} with {{LeakDetector}} on the server side, it doesn't seem appropriate for the client side since we actually need to actively close the resources rather than just track them.
One approach considered is building a custom utility class for the client side which is similar in design to {{LeakDetector}} - specifically to handle closing these resources.
was (Author: JIRAUSER298512):
Hi [~adoroszlai] , I'd like to get your perspective on handling resource cleanup on the client side.
Currently, {{{}OzFs{}}}, {{{}RootedOzFs{}}}, and {{BasicOzFs}} use {{finalize}} to close underlying resources via {{{}fsImpl.close(){}}}. This differs from the server-side pattern, where {{finalize}} is primarily used to track resource leaks.
While we can replace {{finalize}} with {{LeakDetector}} on the server side, it doesn't seem appropriate for the client side since we actually need to actively close the resources rather than just track them.
One approach considered is building a custom utility class for the client side which is similar in design to {{LeakDetector - }}specifically to handle closing these resources.
> Remove deprecated finalize() in java.lang.Object
> ------------------------------------------------
>
> Key: HDDS-16404
> URL: https://issues.apache.org/jira/browse/HDDS-16404
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Sarveksha Yeshavantha Raju
> Assignee: Anurag Parvatikar
> Priority: Minor
>
> [CI / compile (25) / compile (25)|https://github.com/apache/ozone/actions/runs/33722833918/job/103210405411#step:13:47]
> finalize() in java.lang.Object has been deprecated and marked for removal
> Ref: https://github.com/apache/ozone/actions/runs/33722833918?pr=11180
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org