[BUG] After the restart of the KB controller, when processing the handleRoleChangedEvent event, a disorder issue occurs #8857
Labels
kind/bug
Something isn't working
severity/major
Great chance user will encounter the same problem
test
Describe the bug
After the restart of the KB controller, when processing the handleRoleChangedEvent event, a disorder issue occurs,causing the roles of the cluster pods to all become secondary.
To Reproduce
Steps to reproduce the behavior:
[event:Success operation:checkRole originalRole:primary role:{"term":"1737561677278961","PodRoleNamePairs":[{"podName":"nacos-mysql-0","roleName":"secondary","podUid":"b1fd6aba-7db4-4319-bed5-c3c9c41d03e5"}]}]
[event:Success operation:checkRole originalRole:primary role:{"term":"1737561678036172","PodRoleNamePairs":[{"podName":"nacos-mysql-0","roleName":"secondary","podUid":"b1fd6aba-7db4-4319-bed5-c3c9c41d03e5"}]}]
[event:Success operation:checkRole originalRole:secondary role:{"term":"1737561678920613","PodRoleNamePairs":[{"podName":"nacos-mysql-0","roleName":"primary","podUid":"b1fd6aba-7db4-4319-bed5-c3c9c41d03e5"}]}]
term1:1737561677278961
term2:1737561678036172
term3:1737561678920613
When processing the event, the order is disrupted, and the term2(1737561678036172) event is processed last, causing the pod.label.role to be updated to secondary instead of the correct primary.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: