RATIS-2385. Don't keep failed requests in the RetryCache. by ss77892 · Pull Request #1339 · apache/ratis
What changes were proposed in this pull request?
If the leader has changed after we placed the request in the RetryCache but before we wrote it to the log file, we should remove it from the cache.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2385
How was this patch tested?
Manual tests with Ozone. Under load with a continuously changing leader, NPEs occur during retry operations. No exception occurs; the patch and retry operations complete successfully.