anatasiavela commented on code in PR #13078:
URL: https://github.com/apache/kafka/pull/13078#discussion_r1063890647


##########
core/src/main/scala/kafka/log/ProducerStateManager.scala:
##########
@@ -684,7 +700,7 @@ class ProducerStateManager(
     }
 
     if (logEndOffset != mapEndOffset) {
-      producers.clear()

Review Comment:
   I considered another helper, but `clear()` iterates all the keys anyways so 
I thought it would be cleaner this way
   ```
   def clear(): Unit = { keysIterator foreach -= }
   ```



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