-
Notifications
You must be signed in to change notification settings - Fork 89
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
[da-vinci][dvc] Flag enablement for automatic subscription of partitions #1332
base: main
Are you sure you want to change the base?
Conversation
clients/da-vinci-client/src/main/java/com/linkedin/davinci/StoreBackend.java
Outdated
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Outdated
Show resolved
Hide resolved
2055b04
to
52a557c
Compare
b94b49a
to
262bbc6
Compare
…iption. Enabled config flag over bootstrap subscription
…iption. Enabled config flag over bootstrap subscription
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Outdated
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/ConfigKeys.java
Outdated
Show resolved
Hide resolved
a163e56
to
9dbffc9
Compare
…cally. Integration Test [In Writing]
9dbffc9
to
fd9fa02
Compare
…cally. Integration Test [In Writing]
...ice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/DaVinciClientTest.java
Outdated
Show resolved
Hide resolved
…cally. Integration Test [In Writing]
…cally. Integration Test [In Writing]
clients/da-vinci-client/src/main/java/com/linkedin/davinci/client/AvroGenericDaVinciClient.java
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
...ice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/DaVinciClientTest.java
Outdated
Show resolved
Hide resolved
...ice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/DaVinciClientTest.java
Show resolved
Hide resolved
…cally. Integration Test [In Writing]
...ice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/DaVinciClientTest.java
Outdated
Show resolved
Hide resolved
...ice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd/DaVinciClientTest.java
Outdated
Show resolved
Hide resolved
…ally. Integration Test [In Writing]
…ally. Integration Test [In Writing]
893a23c
to
7ba15f0
Compare
…cally. Include integration test for testing config flag and subscription set.
…cally. Included integration test and writing of unit test.
…pdated with integration test and unit test.
protected void executeBootstrapping() { | ||
bootstrap(); | ||
} | ||
|
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.
Instead of doing this, can you change the access modifier on bootstrap()
to protected
?
// DA_VINCI_SUBSCRIBE_ON_DISK_PARTITIONS_AUTOMATICALLY == false | ||
when(mockCombinedProperties.getBoolean(anyString(), anyBoolean())).thenReturn(false); | ||
doCallRealMethod().when(backend).executeBootstrapping(); | ||
backend.executeBootstrapping(); | ||
|
||
ComplementSet<Integer> subscription = mockStoreBackend.getSubscription(); | ||
assertTrue(subscription.contains(0)); | ||
assertTrue(subscription.contains(1)); | ||
assertFalse(subscription.contains(2)); |
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.
Can you add another section to this test where DA_VINCI_SUBSCRIBE_ON_DISK_PARTITIONS_AUTOMATICALLY
== true
and all of the partitions are in subscription
?
Summary, imperative, start upper case, don't end with a period
In this PR, to make sure the correct partitions are subscribed/added to the subscription set in processes of Da Vinci Client, a code change is introduced to include a flag (
DA_VINCI_SUBSCRIBE_ON_DISK_PARTITIONS_AUTOMATICALLY
) for enabling/confirming automatic subscription of on-disk partitions. This flag is added to the config map in the VeniceConfigLoader. Flag value is checked during bootstrapping in DaVinciBackend in case automatic subscription is not wanted, so that subscription occurs correctly.Applying this issue to Da Vinci Client which has information over partitions in storage.
DA_VINCI_SUBSCRIBE_ON_DISK_PARTITIONS_AUTOMATICALLY is by default set to true, where in DaVinciBackend the subscription by default occurs.
This PR is an extension of the PR #1196 [https://github.com//pull/1196] that checks which partitions should be kept [in
StorageService
] and applies the check inVeniceServer
.Resolves #650
How was this PR tested?
A corresponding test will be written.
EDIT: A corresponding integration test has been written. Example testing includes the case where the config key is set to false to prevent automatic subscription.
Does this PR introduce any user-facing changes?