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

   * currently in ShareCoordinatorShard the writeState RPC allows negative 
leader and state epoch values and in readState allows negative leaderEpoch.
   * these scenarios should not be possible since readState is called from 
SharePartition and  will always be preceded by initializeState call, which sets 
the stateEpoch (non negative). Furthermore,  SharePartition also creates new 
leaderEpoch per leadership change.
   * writeState will always be followed by readState which will have correctly 
set the leaderEpoch by virtue of SharePartition. And since initializeState 
correctly sets stateEpoch - writes should contain valid values for both the 
epochs.
   * in light of this ShareCoordinatorShard has been tightened.
   * new tests have been added to verify the change.


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

Reply via email to