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

[feat][broker]PIP-180 ShadowTopic - Part III - Add shadowTopics in TopicPolicy #17242

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

Jason918
Copy link
Contributor

@Jason918 Jason918 commented Aug 23, 2022

Master Issue: #16153

Motivation

Source topic need to know its shadow topic list to start the ShadowReplicators.

Note: Shadow topic also need to know its source topic, but it can't implemented with topic policy. Because topic policy can only guarantee eventual consistency and shadow topic must know its source topic during initialization.

Modifications

Add shadowTopics in TopicPolicy and create/delete/get commands in admin clients.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • TopicPoliciesTest#testShadowTopic

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    Doc added in pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java

@Jason918 Jason918 self-assigned this Aug 23, 2022
@Jason918 Jason918 changed the title [feat][broker] PIP-180 - ShadowTopic - Part III : Add shadowTopics in TopicPolicy. [feat][broker]PIP-180 ShadowTopic - Part III - Add shadowTopics in TopicPolicy Aug 23, 2022
@Jason918
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Jason918 Jason918 force-pushed the pip-180.3 branch 2 times, most recently from a41a585 to cfa37a4 Compare August 24, 2022 10:41
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Overall lgtm
I have a concern about the name of the REST endpoint

@@ -4236,5 +4236,84 @@ public void setSchemaValidationEnforced(@Suspended AsyncResponse asyncResponse,
});
}

@GET
@Path("/{tenant}/{namespace}/{topic}/shadowTopic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the name be 'plural' ? shadowTopics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eolivelli Make sense, addressed.

@Jason918 Jason918 requested review from eolivelli and AnonHxy August 25, 2022 02:03
@Jason918
Copy link
Contributor Author

@Technoboy- @mattisonchao @AnonHxy PTAL

@AnonHxy
Copy link
Contributor

AnonHxy commented Aug 26, 2022

LGTM

@Jason918
Copy link
Contributor Author

@eolivelli PTAL

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli merged commit 4434bf2 into apache:master Aug 31, 2022
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