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

[controller][compat] Controller part change for supporting separate real-time topic functionality for hybrid stores. #1172

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

Conversation

haoxu07
Copy link
Contributor

@haoxu07 haoxu07 commented Sep 12, 2024

Summary, imperative, start upper case, don't end with a period

This change add store version level config separateRealTimeTopicEnabled to allow creating separate real-time topic for isolate bulk real-time traffic in short time range from incremental push. There is cluster level config for enabling this config for all newly converted hybrid store with incremental push enabled.

  1. Creation: it will be automatically created by checking whether incremental push and separateRealTimeTopicEnabled is enabled when hybrid enabled store version is added and normal real-time topic is created.
  2. Deletion: separate real time topic will be cleaned up when normal real-time topic is deleted due to all hybrid store version has been deleted.

Added Integration test to see if incremental push job would send expected traffic to the separate real-time topic after new store is turned this feature.

How was this PR tested?

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

@haoxu07 haoxu07 marked this pull request as ready for review September 13, 2024 17:40
Copy link
Contributor

@sixpluszero sixpluszero left a comment

Choose a reason for hiding this comment

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

Thanks Hao for the change. I take one pass, overall it looks good, I left a few small comments for clarification.

@@ -25,7 +25,7 @@ public interface Version extends Comparable<Version>, DataModelBackedStructure<S
String VERSION_SEPARATOR = "_v";
String REAL_TIME_TOPIC_SUFFIX = "_rt";
String STREAM_REPROCESSING_TOPIC_SUFFIX = "_sr";

String INCREMENTAL_PUSH_REAL_TIME_TOPIC_SUFFIX = "_rt_sep";
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's follow the existing pattern to separate topic suffix, how about "_inc"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I set this name due to that is separate real-time topic with lower priority. Incremental push is only one use case at this moment. But just do not want to limit the scope to incremental push only.

if (setStore.incrementalPushEnabled
&& controllerConfig.enabledSeparateRealTimeTopicForStoreWithIncrementalPush()) {
setStore.separateRealTimeTopicEnabled = true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to also add the SEPARATED_TOPIC config update in the updatedConfigsList so that it get populated into child controller?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I will add this.

partitionCount,
replicationFactor,
StoreUtils.getExpectedRetentionTimeInMs(store, hybridStoreConfig.get()),
false, // Note: do not enable RT compaction! Might make jobs in Online/Offline model stuck
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: looks like the comment is outdated - maybe we can remove it in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering the case if the existing store is upgraded from non-A/A hybrid -> A/A and then enable this config or it is default enabled by cluster level config, but since RT topic has been created before, then this path will be ignored? Do you think it can be move out of this if else block and check separately?

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 is a valid concern. I can add a separate check for this config.

@haoxu07 haoxu07 changed the title [controller] Controller part change for supporting separate real-time topic functionality for hybrid stores. [controller][compat] Controller part change for supporting separate real-time topic functionality for hybrid stores. Sep 18, 2024
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