Skip to content

Commit 878304f

Browse files
majisourav99Sourav Maji
and
Sourav Maji
authored
[router] Do not classify REQUEST_ENTITY_TOO_LARGE as unhealthy (#1292)
* [router] Do not classify REQUEST_ENTITY_TOO_LARGE as unhealthy --------- Co-authored-by: Sourav Maji <[email protected]>
1 parent 90dd662 commit 878304f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/router/TestRead.java

+2
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ public void testRead() throws Exception {
450450
storeClient.batchGet(keySet).get();
451451
fail("Should receive exception since the batch request key count exceeds cluster-level threshold");
452452
} catch (Exception e) {
453+
double unhealthyRequestCount = getAggregateRouterMetricValue(".total--multiget_unhealthy_request.Count");
454+
Assert.assertEquals(unhealthyRequestCount, 0.0, "There should not be any unhealthy requests!");
453455
LOGGER.info(e);
454456
}
455457
// Bump up store-level max key count in batch-get request

Diff for: services/venice-router/src/main/java/com/linkedin/venice/router/api/RouterExceptionAndTrackingUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private static void metricTracking(
153153
ROUTER_STATS.getStatsByType(requestType.isPresent() ? requestType.get() : RequestType.SINGLE_GET);
154154
// If we don't know the actual store name, this error will only be aggregated in server level, but not
155155
// in store level
156-
if (responseStatus.equals(BAD_REQUEST)) {
156+
if (responseStatus.equals(BAD_REQUEST) || responseStatus.equals(REQUEST_ENTITY_TOO_LARGE)) {
157157
stats.recordBadRequest(storeName.orElse(null));
158158
} else if (responseStatus.equals(TOO_MANY_REQUESTS)) {
159159
if (storeName.isPresent()) {

0 commit comments

Comments
 (0)