This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new bd83e7d7 RATIS-1607. Fix NPE in OrderedAsync#sendRequestWithRetry
(#664)
bd83e7d7 is described below
commit bd83e7d7fd41540c8bda6bd92a52ac99ccec2076
Author: Sammi Chen <[email protected]>
AuthorDate: Thu Jun 30 22:57:28 2022 +0800
RATIS-1607. Fix NPE in OrderedAsync#sendRequestWithRetry (#664)
---
.../src/main/java/org/apache/ratis/client/impl/OrderedAsync.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java
b/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java
index 5bd85698..22515662 100644
--- a/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java
+++ b/ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java
@@ -179,6 +179,10 @@ public final class OrderedAsync {
}
private void sendRequestWithRetry(PendingOrderedRequest pending) {
+ if (pending == null) {
+ return;
+ }
+
final CompletableFuture<RaftClientReply> f = pending.getReplyFuture();
if (f.isDone()) {
return;