szetszwo commented on code in PR #1676:
URL: https://github.com/apache/ratis/pull/1676#discussion_r4471281980


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/ReadRequestHandler.java:
##########
@@ -81,6 +81,12 @@ RaftGroupMemberId getMemberId() {
   }
 
   CompletableFuture<RaftClientReply> staleReadAsync(RaftClientRequest request) 
{
+    final long installSnapshot = 
server.getSnapshotInstallationHandler().getInProgressInstallSnapshotIndex();
+    final ReadException ex = getReadException("stale read", installSnapshot, 
false);
+    if (ex != null) {
+      return CompletableFuture.completedFuture(
+          server.newExceptionReply(request, new 
StateMachineException(getMemberId(), ex)));

Review Comment:
   We should just `server.newExceptionReply(request, ex)`.  
StateMachineException must come from StateMachine.
   



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