-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix thread safety issue in consistency pipeline #775
base: main
Are you sure you want to change the base?
Conversation
eb19af5
to
d24a7b6
Compare
@@ -310,6 +308,12 @@ class Fetcher(val kvStore: KVStore, | |||
val loggingTry: Try[Unit] = joinCodecTry.map(codec => { | |||
val metaData = codec.conf.join.metaData | |||
val samplePercent = if (metaData.isSetSamplePercent) metaData.getSamplePercent else 0 | |||
|
|||
// Exit early if sample percent is 0 | |||
if (samplePercent == 0) { |
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.
thank you.
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.
LGTM
Ah missed this, I will fix it in #857! |
Thanks @hzding621. We can close this PR after yours is merged. |
* make logging codec thread safe * cherry-pick #775 --------- Co-authored-by: Haozhen Ding <[email protected]>
Summary
This changes things such that a new instance of the AvroCodec is used instead of re-using the same one across requests.
Why / Goal
To log feature values for the consistency pipeline, we use AvroCodec to encode and hash keys, but the Avro encoding here is not thread safe.
Test Plan
Checklist
Reviewers