[
https://issues.apache.org/jira/browse/HDDS-16404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120553#comment-18120553
]
Anurag Parvatikar commented on HDDS-16404:
------------------------------------------
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: [email protected]
For additional commands, e-mail: [email protected]