Skip to content

Commit 7df7e86

Browse files
committed
Removed internal logic to set maxReadKB
1 parent 6e3b670 commit 7df7e86

File tree

1 file changed

+0
-21
lines changed
  • driver/src/main/java/oracle/nosql/driver/http

1 file changed

+0
-21
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -373,27 +373,6 @@ public Result execute(Request kvRequest) {
373373
}
374374
}
375375

376-
/*
377-
* If the request is a query, and it has unlimited readKB, and there's
378-
* a valid read rate limiter, set the max read KB to the larger of
379-
* 10KB or read rate limit. This helps very large queries to not
380-
* overuse resources when rate limiting is in effect.
381-
*/
382-
if (readLimiter != null && kvRequest instanceof QueryRequest &&
383-
((QueryRequest)kvRequest).getMaxReadKB() == 0) {
384-
/* factor in request rate limiter percentage (100.0 == full) */
385-
double rlPercent = kvRequest.getRateLimiterPercentage();
386-
int maxKB =
387-
(int)((rlPercent * readLimiter.getLimitPerSecond()) / 100.0);
388-
if (maxKB < 10) {
389-
maxKB = 10;
390-
}
391-
if (maxKB > READ_KB_LIMIT) {
392-
maxKB = READ_KB_LIMIT;
393-
}
394-
((QueryRequest)kvRequest).setMaxReadKB(maxKB);
395-
}
396-
397376
final long startTime = System.currentTimeMillis();
398377
kvRequest.setStartTimeMs(startTime);
399378

0 commit comments

Comments
 (0)