C0urante commented on PR #12041:
URL: https://github.com/apache/kafka/pull/12041#issuecomment-1115515896

   Thanks Guozhang. I think the cost of logging warnings in cases like this is 
fairly low as users can and should adjust their configurations to not use 
nonsensical properties, and the benefit can be high in the event that a user is 
confused about client behavior. I do sympathize with concerns that the warning 
for an unused property may make it seem like the property is unconditionally 
unrecognized (i.e., not defined by a client at all) instead of conditionally 
unrecognized (i.e., not used because of other properties).
   
   One alternative could be to use the newly-introduced 
[ConnectUtils::ensureProperty](https://github.com/apache/kafka/blob/8245c9a3d5af2ad891844194a5fa281af471b568/connect/runtime/src/main/java/org/apache/kafka/connect/util/ConnectUtils.java#L77-L101)
 or something similar to it (possibly one that logs a warning if _any_ value 
for a specific property is given, regardless of whether it matches the 
default). This way, we could continue logging warnings for cases like these, 
but make it clear exactly why the property should not be included in the config.
   
   Either way, I think the piecemeal logic introduced in this PR is suboptimal. 
Dedicating one line for every to-be-ignored property is unnecessary if we want 
to remove these warnings for all properties defined by a client; in that case, 
we can use the [approach I described 
earlier](https://github.com/apache/kafka/pull/12041#issuecomment-1100583118), 
which will be easier to maintain and take up less space.


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