duongkame commented on code in PR #3827:
URL: https://github.com/apache/ozone/pull/3827#discussion_r997289200
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedObject.java:
##########
@@ -27,8 +29,17 @@
class ManagedObject<T extends RocksObject> implements AutoCloseable {
private final T original;
+ private final StackTraceElement[] elements;
+
+ public static final Logger LOG =
LoggerFactory.getLogger(ManagedObject.class);
+
ManagedObject(T original) {
this.original = original;
+ if (LOG.isDebugEnabled()) {
Review Comment:
nit: This separates the decision of creating and logging stacktrace to 2
different authorities/configs. I guess ManagedRocksObjectUtils can export some
method like `isStacktraceDebugEnabled` and it can be the only authority of
determining if stacktrace should be created and logged.
--
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]