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

[Improvement-16850][API] Broadcast to cluster when worker group changed #16860

Merged

Conversation

ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented Nov 29, 2024

Purpose of the pull request

close #16850

Brief change log

  • Notify master worker group changed once we upsert a worker group.
  • Remove unused param jsonParam

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_broadcastWorkerGroupChanged branch 2 times, most recently from 84b34f4 to 729e8fd Compare December 2, 2024 02:16
@github-actions github-actions bot added e2e e2e test document labels Dec 2, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_broadcastWorkerGroupChanged branch from 729e8fd to 5ca2308 Compare December 2, 2024 02:18
SbloodyS
SbloodyS previously approved these changes Dec 2, 2024
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

LGTM

@SbloodyS SbloodyS added the improvement make more easy to user or prompt friendly label Dec 2, 2024
.withHost(master.getHost() + ":" + master.getPort())
.refreshWorkerGroup();
} catch (Exception e) {
log.error("Broadcast to master: {} that worker group changed failed", master, e);
Copy link
Member

Choose a reason for hiding this comment

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

If there are occasional network interruptions between the API server and master, should retries be implemented during broadcasting? Otherwise, master will take 5 minutes to update.

Copy link
Member

Choose a reason for hiding this comment

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

If there are occasional network interruptions between the API server and master, should retries be implemented during broadcasting? Otherwise, master will take 5 minutes to update.

I think if users needs a faster update just adjust 5 minutes to a smaller value, which allows user-defined.

Copy link
Member Author

@ruanwenjun ruanwenjun Dec 3, 2024

Choose a reason for hiding this comment

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

The max delay is 5 minutes, user can reduce this by modified the value at master's config. I don't want to add retry here, since we use long-connection, in most cases, the network should work well, otherwise we may need to add unify retry at rpc framework.

Copy link
Member

Choose a reason for hiding this comment

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

add unify retry at rpc framework

LGTM. Maybe we can create a new issue about this? @ruanwenjun

Copy link
Member Author

Choose a reason for hiding this comment

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

I create #16870 to track this.

Copy link

sonarqubecloud bot commented Dec 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
45.6% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

@SbloodyS SbloodyS merged commit 84f6a0f into apache:dev Dec 3, 2024
69 of 70 checks passed
@ruanwenjun ruanwenjun deleted the dev_wenjun_broadcastWorkerGroupChanged branch December 4, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend document e2e e2e test improvement make more easy to user or prompt friendly test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][API] Broadcast to cluster when worker group changed
3 participants