-
Notifications
You must be signed in to change notification settings - Fork 70
fix: propagate kvstore multi get exception properly #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9cca538
to
4f69380
Compare
I remembered this is already the current behavior right? Did we see any exception case? |
@yuli-han this is the expected behavior, but some scenario is not handled correctly previously and is addressed in the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Haozhen for fixing this corner case!
@@ -670,7 +670,7 @@ class FetcherBase(kvStore: KVStore, | |||
if (debug || Math.random() < 0.001) { | |||
logger.error(s"Failed to fetch $groupByRequest", ex) | |||
} | |||
Map(groupByRequest.name + "_exception" -> ex.traceString) | |||
Map(prefix + "_exception" -> ex.traceString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does prefix
have the group by's request name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, prefix here actually stores joinPart.fullPrefix
. It's better to use joinPart.fullPrefix
than groupByRequest.name
because fullPrefix
also contains joinPart.prefix
.
There are edge cases where two join_part may share the same underlying GroupBy, but different prefix in join part, e.g. prefix = host vs guest, but both user-level GroupBy
Failure(buildException(e)) | ||
case Success(resp) => | ||
if (resp.values.isFailure) { | ||
Failure(buildException(resp.values.failed.get)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh so the failure was nested within the response value😑
Good catch.
This reverts commit b45d1c2.
…965) This reverts commit b45d1c2. Co-authored-by: Haozhen Ding <[email protected]>
Summary
Fix
KVStore.getString
such that the cases whereKVStore.multiGet
returns aFailure
can be properly handled.Why / Goal
Fetcher should handle join parts failures and return partial results. When KVStore throws exceptions for a certain GroupBy, the exception should be caught and swallowed as an exception string the responseMap instead of failing the whole request.
Test Plan
Checklist
Reviewers
@airbnb/airbnb-chronon-maintainers @pengyu-hou @yuli-han