Skip to content

Commit 1d5b6f5

Browse files
authored
Updated rate limiter timeout message
Also updated regular timeout message to not show requestId if it is empty (to avoid confusion).
1 parent b3f3a1b commit 1d5b6f5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

driver/src/main/java/oracle/nosql/driver/http/Client.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@ public Result execute(Request kvRequest) {
924924
kvRequest.setRateLimitDelayedMs(rateDelayedMs);
925925
statsControl.observeError(kvRequest);
926926
throw new RequestTimeoutException(timeoutMs,
927-
requestClass + " timed out: requestId=" + requestId + " " +
927+
requestClass + " timed out:" +
928+
(requestId.isEmpty() ? "" : " requestId=" + requestId) +
928929
" nextRequestId=" + nextRequestId() +
929930
" iterationTimeout=" + thisIterationTimeoutMs + "ms " +
930931
(kvRequest.getRetryStats() != null ?

driver/src/main/java/oracle/nosql/driver/util/SimpleRateLimiter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public int consumeUnitsWithTimeout(long units, int timeoutMs,
181181
if (timeoutMs > 0 && msToSleep >= timeoutMs) {
182182
uninterruptibleSleep(timeoutMs);
183183
throw new TimeoutException("timed out waiting " + timeoutMs +
184-
"ms for " + units + " units in rate limiter");
184+
"ms due to rate limiting");
185185
}
186186

187187
/* sleep for the requested time. */

0 commit comments

Comments
 (0)