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

[fix](tablet report) fix not add replicas when a backend re join the cluster after changing its ip or port #22700

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

yujun777
Copy link
Collaborator

@yujun777 yujun777 commented Aug 8, 2023

Proposed changes

If a backend wants to change its ip or port, proceed as follows:

  1. drop this backend force (alter system dropp backend old_ip:old_port);
  2. change this backend's ip in be.conf;
  3. restart this backend;
  4. add this backend back (alter system add backend new_ip:new_port).

After adding back, this backend will report its existing tablets to fe, but the fe will found the tablet status is force redunant and delete the replicas on this backend.

This PR is to fix the problem above. It will add the replica back when the tablet is force redunant.

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@yujun777
Copy link
Collaborator Author

yujun777 commented Aug 8, 2023

run buildall

@yujun777 yujun777 changed the title [fix](tablet-report) fix not add replicas when a backend re join the cluster after changing its ip [fix](tablet-report) fix not add replicas when a backend re join the cluster after changing its ip or port Aug 8, 2023
@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.54 seconds
stream load tsv: 514 seconds loaded 74807831229 Bytes, about 138 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.6 seconds inserted 10000000 Rows, about 337K ops/s
storage size: 17162344311 Bytes

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring
Copy link
Contributor

what if adding back happens before fe detected the be is gone.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Aug 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

PR approved by anyone and no changes requested.

@yujun777
Copy link
Collaborator Author

yujun777 commented Aug 9, 2023

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.16 seconds
stream load tsv: 515 seconds loaded 74807831229 Bytes, about 138 MB/s
stream load json: 22 seconds loaded 2358488459 Bytes, about 102 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162424216 Bytes

@yujun777 yujun777 changed the title [fix](tablet-report) fix not add replicas when a backend re join the cluster after changing its ip or port [fix](tablet report) fix not add replicas when a backend re join the cluster after changing its ip or port Aug 9, 2023
@dataroaring dataroaring merged commit 50fbe31 into apache:master Aug 10, 2023
16 checks passed
xiaokang pushed a commit that referenced this pull request Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.1-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants