dajac commented on code in PR #14849: URL: https://github.com/apache/kafka/pull/14849#discussion_r1409232801
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java: ########## @@ -528,8 +528,8 @@ private void transitionTo( case LOADING: state = CoordinatorState.LOADING; snapshotRegistry = new SnapshotRegistry(logContext); - lastWrittenOffset = 0L; - lastCommittedOffset = 0L; + updateLastWrittenOffset(0); + updateLastCommittedOffset(0); Review Comment: I think that this won't always work. For instance, think about the case where we go from Failed to Loading. The reset won't work because `0` is not larger than the current values. It may be better to just keep what was there and to add the first snapshot creating there. -- 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