Skip to content

[fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing and handle role change during role init - #22112

Merged
heesung-sohn merged 4 commits into
apache:masterfrom
heesung-sohn:update-getOwnerAsync
Feb 28, 2024
Merged

heesung-sohn merged 4 commits into
apache:masterfrom
heesung-sohn:update-getOwnerAsync

Conversation

@heesung-sohn

@heesung-sohn heesung-sohn commented Feb 24, 2024 •

Copy link
Copy Markdown
Contributor

Motivation

Upon Assigning and Releasing, if this broker is not the dst broker, return the dst broker as the owner(or empty). Clients need to connect(redirect) to the dst broker anyway and wait for the dst broker to receive Owned. This is also required to return getOwnerAsync on the src broker immediately during unloading. Otherwise, topic creation(getOwnerAsync) could block unloading bundles, if the topic creation(getOwnerAsync) happens during unloading on the src broker.

Found a case that the broker role might change in the middle while running playLeader or playFollower. In this case, we need to break the init loop and restart playLeader or playFollower according to the current role.

Modifications

  • Return getOwnerAsync without waiting on source broker upon Assigning and Releasing
  • Updated role change logic in case the role changes again while initializing the current role.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests.

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

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: heesung-sohn#63

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Feb 24, 2024
@heesung-sohn heesung-sohn self-assigned this Feb 24, 2024
@Technoboy- Technoboy- added this to the 3.3.0 milestone Feb 24, 2024
@Technoboy- Technoboy- closed this Feb 24, 2024
@Technoboy- Technoboy- reopened this Feb 24, 2024
@heesung-sohn heesung-sohn changed the title [fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing [fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing and handle role change during role init Feb 27, 2024
@heesung-sohn
heesung-sohn merged commit 56eb758 into apache:master Feb 28, 2024
heesung-sohn added a commit to heesung-sohn/pulsar that referenced this pull request Feb 29, 2024
…pon Assigning and Releasing and handle role change during role init (apache#22112)

(cherry picked from commit 56eb758)
heesung-sohn added a commit to heesung-sohn/pulsar that referenced this pull request Feb 29, 2024
…pon Assigning and Releasing and handle role change during role init (apache#22112)

(cherry picked from commit 56eb758)
heesung-sohn added a commit that referenced this pull request Feb 29, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (#22112) (#22156)
heesung-sohn added a commit that referenced this pull request Feb 29, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (#22112) (#22156)

(cherry picked from commit b3b1bfb)
heesung-sohn added a commit that referenced this pull request Feb 29, 2024
…pon Assigning and Releasing and handle role change during role init (#22112)

(cherry picked from commit 56eb758)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 1, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (apache#22112) (apache#22156)

(cherry picked from commit b3b1bfb)
(cherry picked from commit 58a45aa)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (apache#22112) (apache#22156)

(cherry picked from commit b3b1bfb)
(cherry picked from commit 58a45aa)
@heesung-sohn
heesung-sohn deleted the update-getOwnerAsync branch April 2, 2024 17:43
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
…pon Assigning and Releasing and handle role change during role init (apache#22112)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants