In VeniceMultiKeyPath::initialize, we check the key count sooner, which is possible thanks to an earlier refactoring to the Avro deserialization code which now returns a List rather than an Iterable.
In VenicePathParser::parseResourceUri, when the batch get key count is exceeded, we mark it as a 413, and then treat it as an "expected exception" in RouterExceptionAndTrackingUtils, which suppresses the stacktrace from the logs.
In RouterExceptionAndTrackingUtils, we further improve the handling of "expected exceptions" so that not only we avoid logging the stacktrace, but we also skip filling it in in the first place. Previously, the stacktrace would be filled in and then suppressed, and filling in stacktraces can be expensive. This change should help not only batch get key count limit breaches but also other forms of quota breaches, store not found, etc.
Miscellaneous:
Tweaked the logging of the build which had a bookkeeping error in the time taken to run each test class.
Added a null check in D2ClientUtils::shutdownClient since it caused some integration tests to fail during their tear down.
How was this PR tested?
GHCI.
Does this PR introduce any user-facing changes?
[ ] No. You can skip the rest of this section.
[x] Yes. Make sure to explain your proposed changes and call out the behavior change.
Clients will receive the 413 status code now instead of 400 if they breach the batch get key count limit.
In VeniceMultiKeyPath::initialize, we check the key count sooner, which is possible thanks to an earlier refactoring to the Avro deserialization code which now returns a List rather than an Iterable.
In VenicePathParser::parseResourceUri, when the batch get key count is exceeded, we mark it as a 413, and then treat it as an "expected exception" in RouterExceptionAndTrackingUtils, which suppresses the stacktrace from the logs.
In RouterExceptionAndTrackingUtils, we further improve the handling of "expected exceptions" so that not only we avoid logging the stacktrace, but we also skip filling it in in the first place. Previously, the stacktrace would be filled in and then suppressed, and filling in stacktraces can be expensive. This change should help not only batch get key count limit breaches but also other forms of quota breaches, store not found, etc.
Miscellaneous:
Tweaked the logging of the build which had a bookkeeping error in the time taken to run each test class.
Added a null check in D2ClientUtils::shutdownClient since it caused some integration tests to fail during their tear down.
How was this PR tested?
GHCI.
Does this PR introduce any user-facing changes?
Clients will receive the 413 status code now instead of 400 if they breach the batch get key count limit.