Elia-Renzoni commented on code in PR #1709:
URL: https://github.com/apache/ratis/pull/1709#discussion_r4730621702
##########
ratis-client/src/main/java/org/apache/ratis/client/impl/OrderedAsync.java:
##########
@@ -268,14 +290,21 @@ private void handleException(PendingOrderedRequest
pending, RaftClientRequest re
final TimeDuration sleepTime = client.getEffectiveSleepTime(e,
action.getSleepTime());
LOG.debug("schedule* retry with sleep {} for attempt #{} of {}, {}",
sleepTime, event.getAttemptCount(), request, retryPolicy);
- final SlidingWindow.Client<PendingOrderedRequest, RaftClientReply>
slidingWindow = getSlidingWindow(request);
+ final SlidingWindow.Client<PendingOrderedRequest, RaftClientReply>
slidingWindow
+ = getSlidingWindow(request).getWindow();
client.getScheduler().onTimeout(sleepTime,
() -> slidingWindow.retry(pending, this::sendRequestWithRetry),
LOG, () -> "Failed* to retry " + pending);
}
void assertRequestSemaphore(int expectedAvailablePermits, int
expectedQueueLength) {
Review Comment:
Fixed here: 3b5884f93b50a928c725348884bfc737250e74ae
I've added a getter used by the tests
```java
+ /** @return the request semaphore for the given target, where null means
the entire group. */
+ Semaphore getRequestSemaphore(RaftPeerId target) {
+ return getSlidingWindow(target).getSemaphore();
}
```
--
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]