Tsz-wo Sze created RATIS-2677:
---------------------------------

             Summary: In OrderedAsync, setFirstRequest() is not needed.
                 Key: RATIS-2677
                 URL: https://issues.apache.org/jira/browse/RATIS-2677
             Project: Ratis
          Issue Type: Improvement
          Components: client
            Reporter: Tsz-wo Sze


{code}
//OrderedAsync
  private void sendRequestWithRetry(PendingOrderedRequest pending) {
    ...
    if (getSlidingWindow(request).isFirst(pending.getSeqNum())) {
      pending.setFirstRequest();
    }
    ...
  }
{code}
{code}

As pointed out by Teligen_ligc in [this 
email|https://lists.apache.org/thread/3vnv0ro2vvz8ckm08t7mm93yo2c1g4f1], the 
call setFirstRequest() above is not needed since it is already set by 
[SlidingWindow$Client.sendOrDelayRequest(..)|https://github.com/apache/ratis/blob/31427daaab2a4f7e95d3be0a0bd654683f7965c4/ratis-common/src/main/java/org/apache/ratis/util/SlidingWindow.java#L314].




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to