adixitconfluent commented on code in PR #20124: URL: https://github.com/apache/kafka/pull/20124#discussion_r2195531788
########## core/src/main/java/kafka/server/share/SharePartition.java: ########## @@ -3103,25 +3112,37 @@ private int updatedDeliveryCount(DeliveryCountOps ops) { }; } - private void archive(String newMemberId) { + // Visible for testing. + synchronized void archive(String newMemberId) { + if (rollbackState != null) { + isMarkedArchived = true; Review Comment: actually, if we don't use the condition `if (rollbackState != null)` and perform `isMarkedArchived = true` in all the cases where archive is called, it won't hurt us. I was being specific to the case that we are trying to handle. I think having either a condition like `if(hasOngoingStateTransition())` makes more sense or not have any condition at all. That won't be problematic either. -- 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