kaijchen commented on PR #808: URL: https://github.com/apache/ratis/pull/808#issuecomment-1436456680
> Note: sometimes transfer leadership succeeds, but the request timed out. This is due to the old leader hasn't received any messages from the new leader yet. Especially in default timeout, i.e. `TransferLeadershipRequest.timeout = 0`, the timeout will default to `server.randomElectionTimeout()`. > > This will lead to `TransferCommand` to return -1, and cause flaky test. So is it better to set a larger default timeout? Set default timeout to `3s` in the new mode. The default timeout in legacy mode (fallback) is kept as `60s`. > To fix this problem, we should wait for the new leader to be elected in the shell. But `AbstractRatisCommand` seems didn't expect the leader to change. Added TODO in comments. It's better to keep changes small in this PR. -- 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]
