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

[Improve][Broker]Reduce GetReplicatedSubscriptionStatus local REST call #16946

Merged

Conversation

AnonHxy
Copy link
Contributor

@AnonHxy AnonHxy commented Aug 4, 2022

Motivation

  • Reduce local REST calll for org.apache.pulsar.broker.admin.impl.PersistentTopicsBase#internalGetReplicatedSubscriptionStatus

Modifications

  • Call local method if partition is owned by this broker, or call REST api usng internal AdminClient

Verifying this change

  • Make sure that the change passes the CI checks.
  • ReplicatorSubscriptionTest has coverd this modification

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
    (Docs have been already added)

@AnonHxy AnonHxy force-pushed the opt_GetReplicatedSubscriptionStatus_local_invoke branch 2 times, most recently from 38f60e7 to 1c188cb Compare August 5, 2022 02:22
@codelipenghui codelipenghui added this to the 2.12.0 milestone Aug 8, 2022
@codelipenghui codelipenghui added release/2.11.1 release/2.10.2 release/2.9.4 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker labels Aug 8, 2022
@AnonHxy AnonHxy requested review from Jason918 and Technoboy- August 22, 2022 12:07
@AnonHxy AnonHxy force-pushed the opt_GetReplicatedSubscriptionStatus_local_invoke branch from 1c188cb to f5d1891 Compare August 28, 2022 05:13
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 28, 2022
@AnonHxy
Copy link
Contributor Author

AnonHxy commented Aug 29, 2022

/pulsarbot run-failure-checks

Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

LGTM

@AnonHxy
Copy link
Contributor Author

AnonHxy commented Aug 31, 2022

/pulsarbot run-failure-checks

@AnonHxy
Copy link
Contributor Author

AnonHxy commented Aug 31, 2022

@codelipenghui @Technoboy- PTAL

@AnonHxy AnonHxy force-pushed the opt_GetReplicatedSubscriptionStatus_local_invoke branch from eff0b45 to acefc33 Compare September 3, 2022 16:11
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

LGTM, left a minor comment.
Is it able to add a test? Looks like spy(admin) -> verify pulsar().getAdminClient().topics() .getReplicatedSubscriptionStatusAsync will not be called.

@AnonHxy AnonHxy force-pushed the opt_GetReplicatedSubscriptionStatus_local_invoke branch from acefc33 to d27971e Compare September 12, 2022 15:06
@AnonHxy AnonHxy closed this Sep 13, 2022
@AnonHxy AnonHxy reopened this Sep 13, 2022
@AnonHxy AnonHxy merged commit 046068a into apache:master Sep 13, 2022
tisonkun pushed a commit to tisonkun/pulsar that referenced this pull request Sep 14, 2022
liangyepianzhou pushed a commit that referenced this pull request Feb 25, 2023
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Feb 28, 2023
…ll (apache#16946)

(cherry picked from commit 046068a)
(cherry picked from commit 830ae26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.10.4 release/2.11.5 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.

7 participants