Skip to content

Commit

Permalink
Addressed Sourav's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixGV committed Oct 19, 2024
1 parent 2040ca4 commit 48938b4
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ public enum FailureType {

private static final Logger LOGGER = LogManager.getLogger(RouterExceptionAndTrackingUtils.class);

/** We do not fill in the stacktrace at all for "expected exceptions" (quota, etc) */
private static final boolean DO_NOT_FILL_IN_STACKTRACE = false;

private static final RedundantExceptionFilter EXCEPTION_FILTER =
RedundantExceptionFilter.getRedundantExceptionFilter();

Expand All @@ -63,7 +60,8 @@ public static RouterException newRouterExceptionAndTracking(
false,
null,
true,
DO_NOT_FILL_IN_STACKTRACE)
/** We do not fill in the stacktrace at all for "expected exceptions" (quota, etc) */
false)
: new RouterException(HttpResponseStatus.class, responseStatus, responseStatus.code(), msg, false);
String name = storeName.isPresent() ? storeName.get() : "";
if (!EXCEPTION_FILTER.isRedundantException(name, String.valueOf(e.code()))) {
Expand Down Expand Up @@ -119,7 +117,7 @@ public static VeniceException newVeniceExceptionAndTracking(
String name = storeName.isPresent() ? storeName.get() : "";
VeniceException e = isExpected(responseStatus, failureType)
// Do not dump stack-trace for Quota exceed exception as it might blow up memory on high load
? new VeniceException(msg, DO_NOT_FILL_IN_STACKTRACE)
? new VeniceException(msg, false)
: new VeniceException(msg);

if (!EXCEPTION_FILTER.isRedundantException(name, e)) {
Expand Down

0 comments on commit 48938b4

Please sign in to comment.