Skip to content

[IOTDB-4361] Add a precheck in removing datanode#7264

Merged
Beyyes merged 13 commits intoapache:masterfrom
MiniSho:remove-datanode-precheck
Sep 14, 2022
Merged

[IOTDB-4361] Add a precheck in removing datanode#7264
Beyyes merged 13 commits intoapache:masterfrom
MiniSho:remove-datanode-precheck

Conversation

@MiniSho
Copy link
Copy Markdown
Contributor

@MiniSho MiniSho commented Sep 7, 2022

We should add a precheck when the confignode executes removing datanode :

  1. Make sure the node which execute addRegionPeer is in running
  2. Throw an error which says it's not supported to remove the datanode because the configuration of the cluster is only one replication.

screenshot:

the configuration is Standalone protocol and when it removes a data node, it will throw an error:
image

when remove a datanode whic is not in running state and the configuration of cluster is one replication, it throws an error:
image

In addition, new a package called confignode in ConfigNodeIT.

1. check replication factor
2. make sure datanode is in running
@MiniSho MiniSho closed this Sep 8, 2022
@MiniSho MiniSho reopened this Sep 8, 2022
Copy link
Copy Markdown
Member

@Beyyes Beyyes left a comment

Choose a reason for hiding this comment

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

add a running test screenshot

Copy link
Copy Markdown
Contributor

@CRZbulabula CRZbulabula left a comment

Choose a reason for hiding this comment

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

PTAL~

@MiniSho
Copy link
Copy Markdown
Contributor Author

MiniSho commented Sep 12, 2022

the configuration is Standalone protocol and when it removes a data node, it will throw an error
ba8f3fe60cbb242de3869c697f25121

@MiniSho
Copy link
Copy Markdown
Contributor Author

MiniSho commented Sep 13, 2022

when remove a datanode whic is not in running state and the configuration of cluster is one replication, it throws an error
289a747043fd6a5108313d80ce46ee0

Copy link
Copy Markdown
Member

@Beyyes Beyyes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@CRZbulabula CRZbulabula left a comment

Choose a reason for hiding this comment

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

LGTM~

@Beyyes Beyyes merged commit f776aa5 into apache:master Sep 14, 2022
@MiniSho MiniSho deleted the remove-datanode-precheck branch September 14, 2022 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants