kfaraz commented on code in PR #17899:
URL: https://github.com/apache/druid/pull/17899#discussion_r2052094813
##########
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java:
##########
@@ -191,6 +192,30 @@ private Map<Dimension, String>
validateDebugDimensions(Map<String, String> debug
return validDebugDimensions;
}
+ public CoordinatorDynamicConfig snapshot()
Review Comment:
Ideally, if the config is immutable, the sets it uses should be immutable
too.
So, you can update the constructor to make sure that everything is immutable.
Making a duplicate copy (i.e. without any changes) of an immutable object
adds any value.
##########
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java:
##########
@@ -191,6 +192,30 @@ private Map<Dimension, String>
validateDebugDimensions(Map<String, String> debug
return validDebugDimensions;
}
+ public CoordinatorDynamicConfig snapshot()
Review Comment:
Ideally, if the config is immutable, the sets it uses should be immutable
too.
So, you can update the constructor to make sure that everything is immutable.
Making a duplicate copy (i.e. without any changes) of an immutable object
does not add any value.
--
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]