Skip to content
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

Don't request null keys from KVStore #774

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jbrooks-stripe
Copy link
Collaborator

@jbrooks-stripe jbrooks-stripe commented Jun 14, 2024

Summary

Updates the Fetcher to not include or attempt any requests when the keys are null.

Why / Goal

KVStore implementations are left up to consumers. In the case where null entries are being written out, this can lead to online/offline consistency issues. The GroupByUpload jobs are all setup to filter out any null keys, but the KVStore will still attempt to pull values if they exist. This adds parity with the null checks done in the GroupByUpload jobs to the online path and will exclude any attempt to pull values for null keys.

Test Plan

  • Added Unit Tests
  • Covered by existing CI
  • Integration tested

Checklist

  • Documentation update

Reviewers

@jbrooks-stripe jbrooks-stripe marked this pull request as ready for review June 15, 2024 22:34
@piyushn-stripe
Copy link
Collaborator

@jbrooks-stripe - might need a rebase of this branch

Copy link
Collaborator

@piyushn-stripe piyushn-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment, changes look good to me though.
Let's have someone from Airbnb also take a look.

@@ -141,4 +141,50 @@ class FetcherBaseTest extends MockitoSugar with Matchers {
actualRequest.get.name shouldBe query.groupByName + "." + query.columnName
actualRequest.get.keys shouldBe query.keyMapping.get
}

@Test
def testParsingGroupByResponse_HappyHase(): Unit = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
s/HappyHase/HappyCase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants