-
Notifications
You must be signed in to change notification settings - Fork 113
[controller] [server] extend rt versioning to system stores #2264
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR appears to be a work-in-progress change that modifies real-time topic handling logic and adds debugging code. The main changes include updating a log message to include the real-time topic name, modifying the composeRealTimeTopic method to delegate to its versioned counterpart, and temporarily altering the isRTVersioningApplicable logic.
- Modified
composeRealTimeTopic(String)to delegate to the versioned method with version 1 - Changed
isRTVersioningApplicableto always return true instead of checking system store types - Added debugging statements with
System.out.printlncalls
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| VeniceHelixAdmin.java | Enhanced log message to include the real-time topic name for better debugging |
| Utils.java | Modified real-time topic composition and versioning applicability logic with commented-out code and debug statements |
| MetaStoreWriter.java | Added unused variable declaration for old topic name |
| PubSubTopicImpl.java | Added debugging code with empty print statement for specific topic pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/venice-common/src/main/java/com/linkedin/venice/utils/Utils.java
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/utils/Utils.java
Outdated
Show resolved
Hide resolved
e3f7077 to
6498e12
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.
Pull Request Overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceParentHelixAdmin.java
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/system/store/MetaStoreWriter.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
clients/da-vinci-client/src/test/java/com/linkedin/davinci/DaVinciBackendTest.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Outdated
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
...mon/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreVeniceWriterCache.java
Outdated
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/system/store/MetaStoreWriter.java
Outdated
Show resolved
Hide resolved
...a-vinci-client/src/test/java/com/linkedin/davinci/kafka/consumer/StoreIngestionTaskTest.java
Show resolved
Hide resolved
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.
Pull Request Overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
.../venice-common/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreWriter.java
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/system/store/MetaStoreWriter.java
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
...mon/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreVeniceWriterCache.java
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/system/store/MetaStoreWriter.java
Outdated
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceHelixAdmin.java
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
...mon/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreVeniceWriterCache.java
Show resolved
Hide resolved
...-controller/src/main/java/com/linkedin/venice/controller/ParticipantStoreClientsManager.java
Show resolved
Hide resolved
| return storeRepository; | ||
| } | ||
|
|
||
| public final Object getStore(String 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.
This logic scattered in here is not great IMO.
I think the main purpose to extract push status store's RT version right? Then can we just instead pass ReadOnlyStoreRepository interface into the the PushStatusStoreWriter constructor, and extract the user store object -> extract system store info -> get largest RT version when preparing VW? I think this will make the logic hidden inside the corresponding object.
Same comment goes to MetaStoreWriter.
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.
I read the code again. I think even with the discussion we had offline, I think this method is still not great as (1) this is internal usage and we should not expose as public and leave it in this class (2) the usage is limited.
Also, I see meta store writer and push status store writer is having duplicate logic of getting RT topic from the Store-like object.
Can we move this method to Util class, and also create a method to extract that duplicate logic from both class to be a getRealtimeTopicNameFromStore util method?
| Store store = storeResolver.apply(metaStoreName); | ||
| int largestUsedRTVersionNumber; | ||
| VeniceSystemStoreType type = VeniceSystemStoreType.getSystemStoreType(store.getName()); | ||
| if (type != null && store.isSystemStore()) { |
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.
If the store is not system store, should we just return null, as this function is for system store only.
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.
This if block is actually to distinguish b/w user system store and zkShared system store
3f62e17 to
7e9ab58
Compare
7e9ab58 to
4da90c1
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.
Pull request overview
Copilot reviewed 30 out of 30 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/venice-common/src/main/java/com/linkedin/venice/system/store/MetaStoreWriter.java
Show resolved
Hide resolved
.../venice-common/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreWriter.java
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
...mon/src/main/java/com/linkedin/venice/pushstatushelper/PushStatusStoreVeniceWriterCache.java
Outdated
Show resolved
Hide resolved
clients/da-vinci-client/src/main/java/com/linkedin/davinci/DaVinciBackend.java
Show resolved
Hide resolved
4da90c1 to
d286572
Compare
d286572 to
a509157
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.
Pull request overview
Copilot reviewed 30 out of 30 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/venice-common/src/main/java/com/linkedin/venice/utils/Utils.java
Show resolved
Hide resolved
internal/venice-test-common/src/integrationTest/resources/log4j2-test.xml
Outdated
Show resolved
Hide resolved
...grationTest/java/com/linkedin/venice/controller/TestParentControllerWithMultiDataCenter.java
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/Admin.java
Show resolved
Hide resolved
a509157 to
f859323
Compare
f859323 to
001bf7e
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.
Pull request overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
001bf7e to
ae75269
Compare
| if (storeIngestionTask.isHybridMode() && partitionConsumptionState.isEndOfPushReceived() | ||
| && partitionConsumptionState.getLeaderFollowerState() == LeaderFollowerStateType.LEADER) { | ||
| ingestingTopic = pubSubTopicRepository.getTopic(Utils.composeRealTimeTopic(storeName)); | ||
| ingestingTopic = pubSubTopicRepository.getTopic(Utils.getRealTimeTopicName(store)); |
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 this util come with a fallback? I think it is important to have a fallback inside the util method so that it does not throw exception in a random place
| return storeRepository; | ||
| } | ||
|
|
||
| public final Object getStore(String 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.
I read the code again. I think even with the discussion we had offline, I think this method is still not great as (1) this is internal usage and we should not expose as public and leave it in this class (2) the usage is limited.
Also, I see meta store writer and push status store writer is having duplicate logic of getting RT topic from the Store-like object.
Can we move this method to Util class, and also create a method to extract that duplicate logic from both class to be a getRealtimeTopicNameFromStore util method?
Problem Statement
This pull request extend RT Versioning introduced for user stores in PR#1555, PR#1657 to system stores.
To find the right RT name, we need to now have
Storeobject of a system store, which is the why we have added a unified store resolver for system store access in various components.System Store Resolution Improvements
getStoremethod toDaVinciBackendto correctly resolve system stores and user stores, improving how system store attributes are accessed.System Store Topic Handling
StoreIngestionTaskto use the store resolver for system store topic name resolution, ensuring correct topic handling for meta stores.Storeobjects rather than raw strings, improving correctness.Solution
Code changes
Concurrency-Specific Checks
Both reviewer and PR author to verify
synchronized,RWLock) are used where needed.ConcurrentHashMap,CopyOnWriteArrayList).How was this PR tested?
Does this PR introduce any user-facing or breaking changes?