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

[metasrv] feature: leave a cluster with databend-meta --leave.. #6181

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

drmingdrmer
Copy link
Member

  • Inform a cluster to remove a node from it:

    databend-meta --leave-id <node_id_to_remove> --leave-via <node_addr_1> <node_addr_2>...

    databend-meta --leave-via will try to remove the node and quit at once.

    --leave-via specifies a list of the node advertise addresses to send the leave request to.
    See: --raft_advertise_host

    --leave-id specifies the node id to leave. It can be any id in a cluster.

  • An CI of join/leave is added to ./tests/meta-cluster/

  • Add doc docs/doc/50-manage/00-metasrv/20-metasrv-add-remove-node.md about how to remove a node from the cluster

Other refactoring:

  • Remove # MetaRaftError::JoinClusterFail, use MetaError::MetaServiceError instead.

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

Changelog

  • New Feature
  • Improvement
  • Build/Testing/CI
  • Documentation

Related Issues

@vercel
Copy link

vercel bot commented Jun 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jun 23, 2022 at 1:56PM (UTC)

@drmingdrmer drmingdrmer added A-meta Area: databend meta serive and removed need-review labels Jun 23, 2022
@mergify
Copy link
Contributor

mergify bot commented Jun 23, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added pr-feature this PR introduces a new feature to the codebase pr-improvement pr-build this PR changes build/testing/ci steps labels Jun 23, 2022
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Nice!

- Inform a cluster to remove a node from it:

    `databend-meta --leave-id <node_id_to_remove> --leave-via <node_addr_1> <node_addr_2>...`

    `databend-meta --leave-via` will try to remove the node and quit at once.

    `--leave-via` specifies a list of the node `advertise` addresses to send the `leave` request to.
    See: `--raft_advertise_host`

    `--leave-id` specifies the node id to leave. It can be any id in a cluster.

- An CI of join/leave is added to ./tests/meta-cluster/

- Add doc `docs/doc/50-manage/00-metasrv/20-metasrv-add-remove-node.md` about how to remove a node from the cluster

Other refactoring:

- Remove # `MetaRaftError::JoinClusterFail`, use `MetaError::MetaServiceError` instead.
@mergify mergify bot merged commit 388f183 into databendlabs:main Jun 23, 2022
@drmingdrmer drmingdrmer deleted the remove-node branch June 23, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: databend meta serive pr-build this PR changes build/testing/ci steps pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add node admin API(add, remove node) in meta. Use metactl to remove a node from a cluster.
4 participants