dengziming opened a new pull request, #13777:
URL: https://github.com/apache/kafka/pull/13777

   *More detailed description of your change*
   This bug was introduced in #13679, we will invoke `finalizedFeatures` on 
receiving `ApiVersionRequest`, however, it's possible for a standby controller 
to receiving `ApiVersionRequest` on leader failover, and throwing 
UnknownServerError since we don't invoke 
`snapshotRegistry.getOrCreateSnapshot(lastCommittedOffset)` in a standby 
controller.
   
   I reproduced this in #13761, in which we stop the active controller and 
restart it and error will be thrown.
   We can fix it temporally by invoke 
`snapshotRegistry.getOrCreateSnapshot(lastCommittedOffset)` in a standby 
controller, and a better way is to use `Long.MAX_VALUE` in standby controller.
   
   We should also be careful about any rpcs sending to a standby controller, 
currently, only `ApiVersionRequest`.
   
   *Summary of testing strategy (including rationale)*
   I tested it in #13761, but there are some code change we need to make to 
make the code looks better.
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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