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 I - Refactor replicator for ShadowReplicator #17150

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

Jason918
Copy link
Contributor

@Jason918 Jason918 commented Aug 17, 2022

Motivation

ShadowReplicator is part of PIP-180 (#16153).
ShadowReplicator and GeoReplicator(which implemented by PersistentReplicator) share most of the logics.
This PR refactor replicators so that shadow replicator can extends from PersistentReplicator in the next parts of PIP-180.
And moves the geo-replication related logics to GeoPersistentReplicator.

Modifications

  • Add remoteTopicName in AbstractReplicator, for GeoReplicator : remoteTopic == localTopic, for ShadowReplicator: localCluster == remoteCluster.
  • Add AbstractReplicator#replicatorId to help simplify logging info.
  • Add GeoPersistentReplicator
  • A lot of log replacement: log.info("[{}][{} -> {}],...",topicName, localCluster, remoteCluster,...) to log.info("[{}],...",replicatorId,...)

Verifying this change

  • Make sure that the change passes the CI checks.

This PR contains no functional change. All the tests about geo-replication can verify this change.

This change is already covered by existing tests, such as ReplicatorTest.

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

NO

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-not-needed
    Code refactor.

@Jason918 Jason918 self-assigned this Aug 17, 2022
@Jason918 Jason918 added this to the 2.12.0 milestone Aug 17, 2022
@Jason918 Jason918 added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Aug 17, 2022
@github-actions
Copy link

@Jason918 Please provide a correct documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

@Jason918 Jason918 added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Aug 18, 2022
@Jason918
Copy link
Contributor Author

/pulsarbot run-failure-checks

@Jason918 Jason918 changed the title [PIP-180] ShadowTopic - Polish replicator for ShadowReplicator [PIP-180] ShadowTopic - Part I - Refactor replicator for ShadowReplicator Aug 21, 2022
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

@codelipenghui codelipenghui merged commit 43759d2 into apache:master Aug 22, 2022
@codelipenghui codelipenghui changed the title [PIP-180] ShadowTopic - Part I - Refactor replicator for ShadowReplicator [feat][broker]PIP-180: ShadowTopic - Part I - Refactor replicator for ShadowReplicator Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants