You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/10/17 23:57:39 UTC
[GitHub] [ozone] kerneltime commented on a diff in pull request #3827: HDDS-7316. Print stacktrace to identify the location of RocksObject leaks.
kerneltime commented on code in PR #3827:
URL: https://github.com/apache/ozone/pull/3827#discussion_r997600617
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedObject.java:
##########
@@ -42,7 +49,23 @@ public void close() {
@Override
protected void finalize() throws Throwable {
- ManagedRocksObjectUtils.assertClosed(original);
+ ManagedRocksObjectUtils.assertClosed(this);
super.finalize();
}
+
+ public String getStackTrace() {
+ if (elements != null && elements.length > 0) {
+ // 15 lines should be good enough to know the caller of
+ // the unclosed instance?
+ int maxStackTraceLines = 15;
Review Comment:
This will only show up when something went wrong, it's okay not to limit the stacktrace or use a longer stack trace.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org