gharris1727 commented on code in PR #16199:
URL: https://github.com/apache/kafka/pull/16199#discussion_r1628298240


##########
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java:
##########
@@ -188,10 +186,14 @@ public final class RemoteLogManagerConfig {
     public static final String REMOTE_FETCH_MAX_WAIT_MS_DOC = "The maximum 
amount of time the server will wait before answering the remote fetch request";
     public static final int DEFAULT_REMOTE_FETCH_MAX_WAIT_MS = 500;
 
-    public static final ConfigDef CONFIG_DEF = new ConfigDef();
+    public static final ConfigDef CONFIG_DEF;
+
+    public static ConfigDef configDef() {
+        return CONFIG_DEF;

Review Comment:
   It's a pretty common mistake it seems. It is more of a risk when working 
with arbitrary plugins, but is still good practice.
   
   It would have been nice to have ConfigDef be immutable, and have the 
define() methods on a ConfigDefBuilder instead. But the design we have now is 
very entrenched, so we can just cope with it.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to