zhaohaidao commented on a change in pull request #10932:
URL: https://github.com/apache/kafka/pull/10932#discussion_r662378094
##########
File path: raft/src/main/java/org/apache/kafka/raft/ReplicatedCounter.java
##########
@@ -157,13 +160,18 @@ public synchronized void
handleSnapshot(SnapshotReader<Integer> reader) {
public synchronized void handleLeaderChange(LeaderAndEpoch newLeader) {
if (newLeader.isLeader(nodeId)) {
log.debug("Counter uncommitted value initialized to {} after
claiming leadership in epoch {}",
- committed, newLeader);
+ committed, newLeader);
uncommitted = committed;
claimedEpoch = OptionalInt.of(newLeader.epoch());
} else {
log.debug("Counter uncommitted value reset after resigning
leadership");
uncommitted = -1;
claimedEpoch = OptionalInt.empty();
}
+ handleSnapshotCalls = 0;
+ }
+
+ public int handleSnapshotCalls() {
Review comment:
fair enough
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]