jolshan commented on code in PR #13787: URL: https://github.com/apache/kafka/pull/13787#discussion_r1214561227
########## storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java: ########## @@ -184,6 +186,27 @@ private void clearProducerIds() { producerIdCount = 0; } + /** + * Maybe create the VerificationStateEntry for a given producer ID. Return it if it exists, otherwise return null. + */ + public VerificationStateEntry verificationStateEntry(long producerId, boolean createIfAbsent) { + return verificationStates.computeIfAbsent(producerId, pid -> { + if (createIfAbsent) + return new VerificationStateEntry(pid, time.milliseconds()); + else { + log.warn("The given producer ID did not have an entry in the producer state manager, so it's state will be returned as null"); Review Comment: Yes. But in this case, we will fail the verification. -- 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