chia7712 commented on PR #16250: URL: https://github.com/apache/kafka/pull/16250#issuecomment-2158301859
> I suggest leaving unmodifiable maps where we have them today, and making all new maps in the future unmodifiable. That is most difficult part. We have no checks/rules for it, and so anyone can change it unintentionally. For example, `describeTopics` returned mutable map initially, and it was changed to return immutable map [0]. > but there is a small chance that moving from modifiable map to unmodifiable map would cause an application to break if it depends upon the mutability. So, I don't think we can do that change. agree. maybe this PR should complete following tasks instead of origin proposal. 1. make `describeTopics` return mutable map for compatibility. the recent commit changes it to immutable map [0] 2. add unit test to make sure returned map from `alterClientQuotas` is immutable > I don't think that we want the Maps that we return to be altered by the users. At least, we have consensus that immutable maps is better :) [0] https://github.com/apache/kafka/commit/c01279b92acefd9135089588319910bac79bfd4c @dajac @AndrewJSchofield WDYT? -- 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