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] PIP-192 made split handler idempotent #19988

Merged

Conversation

heesung-sn
Copy link
Contributor

@heesung-sn heesung-sn commented Apr 1, 2023

Master Issue: #16691

Motivation

Raising a PR to implement: #16691

Modifications

This PR

  • Makes split handler idempotent .
  • Makes Leader's orphan monitor keep trying to send split msg until finished.
  • Select bundle boundaries at the SplitScheduler to have the same split boundaries for each Split handler retry.
  • Adds a split condition to check if the parent's Splitting state has moved.
  • Made Admin Unload command forceful to unload any bundles in invalid states.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • *Updated unit 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
  • Anything that affects deployment

Documentation

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

We will have separate PRs to update the Doc later.

Matching PR in forked repository

PR in forked repository: heesung-sn#41

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 1, 2023
@heesung-sn heesung-sn force-pushed the pip-192-split-bug-child-exists branch from 0f681d9 to 287b79f Compare April 1, 2023 01:50
targetNsBundle.validateBundle(parentBundle);
} catch (IllegalArgumentException e) {
if (debug) {
log.info("Namespace bundles do not contain the parent bundle:{}",
Copy link
Member

Choose a reason for hiding this comment

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

If namespace bundles do not contain the parent bundle, we shouldn't continue to verify the child bundles, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If namespace bundles do not contain the parent bundle, this means the namespace bundles must have child bundles(the namespace policy must have been updated). Here, we redundantly verify if the child bundles are there. If there is no parent bundle, and if there are no child bundles, the current logic will retry forever. I can't think of a case that the current logics lead to this state, but in the worst case, the error count of the split metrics should constantly increase, expecting the admins to unload this parent bundle.

@heesung-sn heesung-sn force-pushed the pip-192-split-bug-child-exists branch from e3b361b to 9a6708d Compare April 1, 2023 04:46
@heesung-sn
Copy link
Contributor Author

@Demogorgon314 @gaoran10 PLAL by any chance.

@heesung-sn
Copy link
Contributor Author

@Demogorgon314 @Technoboy- PTAL by any chance.

@heesung-sn
Copy link
Contributor Author

heesung-sn commented Apr 3, 2023

@Demogorgon314 fyi, I updated the code

  • to continue splitting after the state override by the monitor.
  • to fix the dst and src broker order in the splitting state data copy.

@heesung-sn heesung-sn force-pushed the pip-192-split-bug-child-exists branch from a7000c5 to c4562ca Compare April 5, 2023 18:32
@Demogorgon314 Demogorgon314 requested a review from Technoboy- April 6, 2023 08:43
@heesung-sn
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@heesung-sn
Copy link
Contributor Author

@Demogorgon314 @Technoboy- plz merge if looking good

@Demogorgon314 Demogorgon314 merged commit 421d707 into apache:master Apr 8, 2023
@heesung-sn heesung-sn deleted the pip-192-split-bug-child-exists branch April 2, 2024 17:44
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 ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants