ashmeet13 commented on code in PR #12988:
URL: https://github.com/apache/kafka/pull/12988#discussion_r1720950900


##########
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java:
##########
@@ -1500,68 +1507,57 @@ private void validateRackAwarenessConfiguration() {
         });
     }
 
+    private void overwritePropertyMap(final Map<String, Object> props, final 
String key, final Object unmodifiableDefaultValue, final String config) {
+        final String overwritePropertyLogMessage = "Unexpected %s config `%s` 
found. User setting (%s) will be ignored and the Kafka Streams default setting 
(%s) will be used";
+        
+        if (props.containsKey(key) && (!Objects.equals(props.get(key), 
unmodifiableDefaultValue))) {
+            log.warn(String.format(overwritePropertyLogMessage, config, key, 
props.get(key), unmodifiableDefaultValue));

Review Comment:
   Got it - I have made this change in the manner that we now have two function 
definitions for `overwritePropertyMap`
   1.  `overwritePropertyMap(Map props, String configName, Object 
unmodifiableValue, Object unmodifiableLogValue, String clientType)`
   2. `overwritePropertyMap(Map props, String configName, Object 
unmodifiableValue, String clientType)`
   
   Since the scope of `overwritePropertyMap` is to both log the warning and 
override the props map it was odd to populate the props with the suggested 
expressions. 
   
   Hence in the scenario of `transaction.id` I have opted to set the value 
still as `null` and log the value as the expressions.
   
   Can you please have a look at the implementation and suggest any 
improvements if possible?



-- 
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]

Reply via email to