-
Notifications
You must be signed in to change notification settings - Fork 90
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
[DVC] Add RequestBasedMetaRepository to enable metadata retrieval directly from server #1467
base: main
Are you sure you want to change the base?
[DVC] Add RequestBasedMetaRepository to enable metadata retrieval directly from server #1467
Conversation
cfa6434
to
80f0745
Compare
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.
Looks good overall, thanks for the refactoring. Just some minor comments and also looks like test coverage is not passing.
...client/src/main/java/com/linkedin/davinci/repository/ThinClientMetaStoreBasedRepository.java
Outdated
Show resolved
Hide resolved
.../da-vinci-client/src/main/java/com/linkedin/davinci/repository/NativeMetadataRepository.java
Outdated
Show resolved
Hide resolved
...client/src/main/java/com/linkedin/davinci/repository/ThinClientMetaStoreBasedRepository.java
Outdated
Show resolved
Hide resolved
...vinci-client/src/test/java/com/linkedin/davinci/repository/NativeMetadataRepositoryTest.java
Outdated
Show resolved
Hide resolved
...vinci-client/src/test/java/com/linkedin/davinci/repository/NativeMetadataRepositoryTest.java
Show resolved
Hide resolved
00fdc3a
to
50d3ef2
Compare
50d3ef2
to
de203f4
Compare
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 for the changes and unit tests, I think we are a bit lacking on the integration tests. See comments below.
getAndCacheSchemaDataFromSystemStore(storeName); | ||
nativeMetadataRepositoryStats.updateCacheTimestamp(storeName, clock.millis()); | ||
} else { | ||
removeStore(storeName); |
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.
Maybe put a comment on NativeMetadataRepository
that it does not handle StoreDataChangedListener#handleStoreDeleted
events? Since the current implementation will throw exceptions during metadata fetch and not really differentiating store deleted vs unable to retrieve metadata.
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.
Wrote a comment above the method stating it will throw the VeniceNoStoreException on either deleting or missing stores. Is this an accurate representation?
nativeMetadataRepository.start(); | ||
// ThinClientMetaStoreBasedRepository implementation should be used since CLIENT_USE_META_SYSTEM_STORE_REPOSITORY | ||
// is set to true without enabling other feature flags. | ||
Assert.assertTrue(nativeMetadataRepository instanceof RequestBasedMetaRepository); |
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.
The comment doesn't match the assertion and also this is a weird place to put a test for RequestBasedMetaRepository
in a file called MetaSystemStoreTest
. Can we add a new test file where we run a more comprehensive integration test with a DVC? i.e push some new versions or make some store config changes and make sure the DVC pick up those changes. You can see examples like the recently added testBatchOnlyMaterializedViewDVCConsumer
. You probably don't need a VeniceTwoLayerMultiRegionMultiClusterWrapper
, a single region will be sufficient.
de203f4
to
277b16c
Compare
[DVC] Add RequestBasedMetaRepository to enable metadata retrieval directly from server
This PR introduces the use of the
/store_properties/{store_name}
endpoint to retrieve and cache store metadata for the DaVinci client. The endpoint was implemented in the Venice Server in this PR: #1374.The
RequestBasedMetaRepository
leverages this endpoint to maintain a cache ofStore
andSchemaData
objects for requested stores. The cache is refreshed by theNativeMetadataRepository
, which this new class extends.By default, this feature is disabled in the
ClientConfig
passed to theNativeMetadataRepository
. The default configuration preserves the current behavior of using theThinClientMetaStoreBasedRepository
. The relevant configuration field isClientConfig.useRequestBasedMetaRepository
. For more details, see NativeMetadataRepository.getInstance.How was this PR tested?
Unit and Integration test included in PR.
Does this PR introduce any user-facing changes?