Skip to content

Conversation

@arjun4084346
Copy link
Contributor

@arjun4084346 arjun4084346 commented Nov 4, 2025

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 Store object 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

  • Added a getStore method to DaVinciBackend to correctly resolve system stores and user stores, improving how system store attributes are accessed.

System Store Topic Handling

  • Modified logic in StoreIngestionTask to use the store resolver for system store topic name resolution, ensuring correct topic handling for meta stores.
  • Updated utility usage to fetch real-time topic names from Store objects rather than raw strings, improving correctness.

Solution

Code changes

  • Added new code behind a config. If so list the config names and their default values in the PR description.
  • Introduced new log lines.
    • Confirmed if logs need to be rate limited to avoid excessive logging.

Concurrency-Specific Checks

Both reviewer and PR author to verify

  • Code has no race conditions or thread safety issues.
  • Proper synchronization mechanisms (e.g., synchronized, RWLock) are used where needed.
  • No blocking calls inside critical sections that could lead to deadlocks or performance degradation.
  • Verified thread-safe collections are used (e.g., ConcurrentHashMap, CopyOnWriteArrayList).
  • Validated proper exception handling in multi-threaded code to avoid silent thread termination.

How was this PR tested?

  • New unit tests added.
  • New integration tests added.
  • Modified or extended existing tests.
  • Verified backward compatibility (if applicable).

Does this PR introduce any user-facing or breaking changes?

  • No. You can skip the rest of this section.
  • Yes. Clearly explain the behavior change and its impact.

Copilot AI review requested due to automatic review settings November 4, 2025 23:35
@arjun4084346 arjun4084346 marked this pull request as draft November 4, 2025 23:35
Copy link

Copilot AI left a 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 isRTVersioningApplicable to always return true instead of checking system store types
  • Added debugging statements with System.out.println calls

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.

@arjun4084346 arjun4084346 force-pushed the rtsystemstore branch 7 times, most recently from e3f7077 to 6498e12 Compare November 13, 2025 11:04
@arjun4084346 arjun4084346 marked this pull request as ready for review November 13, 2025 11:04
Copilot AI review requested due to automatic review settings November 13, 2025 11:04
Copy link

Copilot AI left a 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.

@arjun4084346 arjun4084346 changed the title [controller] extend rt versioning to system stores [controller] [server] extend rt versioning to system stores Nov 13, 2025
Copilot AI review requested due to automatic review settings November 13, 2025 21:56
Copy link

Copilot AI left a 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.

return storeRepository;
}

public final Object getStore(String storeName) {
Copy link
Contributor

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.

Copy link
Contributor

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()) {
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link

Copilot AI left a 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.

@linkedin linkedin deleted a comment from Copilot AI Dec 8, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 8, 2025
Copilot AI review requested due to automatic review settings December 9, 2025 11:20
Copy link

Copilot AI left a 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.

@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
Copilot AI review requested due to automatic review settings December 9, 2025 17:17
Copy link

Copilot AI left a 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.

@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
@linkedin linkedin deleted a comment from Copilot AI Dec 9, 2025
if (storeIngestionTask.isHybridMode() && partitionConsumptionState.isEndOfPushReceived()
&& partitionConsumptionState.getLeaderFollowerState() == LeaderFollowerStateType.LEADER) {
ingestingTopic = pubSubTopicRepository.getTopic(Utils.composeRealTimeTopic(storeName));
ingestingTopic = pubSubTopicRepository.getTopic(Utils.getRealTimeTopicName(store));
Copy link
Contributor

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) {
Copy link
Contributor

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?

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.

3 participants