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

[Bug-358][api] Delete Cluster #369

Merged
merged 9 commits into from
Aug 10, 2023
Merged

[Bug-358][api] Delete Cluster #369

merged 9 commits into from
Aug 10, 2023

Conversation

88fantasy
Copy link
Contributor

@88fantasy 88fantasy commented Aug 9, 2023

Purpose of the pull request

fix #358

Brief change log

image

新增集群状态[停止][删除中][已删除]

当服务全停止时集群会改为停止状态, 此时可以删除集群
当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]

Verify this pull request

This pull request is code cleanup without any test coverage.

新增集群状态[停止],当服务全停止时集群会改为停止状态, 此时可以删除集群
新增集群状态[删除中][已删除],当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]
新增集群状态[删除中][已删除],当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]
@88fantasy 88fantasy changed the title [BUg-358][api] Delete Cluster [Bug-358][api] Delete Cluster Aug 9, 2023
ClusterServiceRoleGroupConfig config = clusterServiceRoleGroupConfigService.getConfigByRoleGroupId(roleInstance.getRoleGroupId());
List<ServiceConfig> oldConfigs = ProcessUtils.getServiceConfig(config);
Map<Generators, List<ServiceConfig>> configFileMap = new ConcurrentHashMap<>();
ProcessUtils.generateConfigFileMap(configFileMap, config);
Copy link
Member

Choose a reason for hiding this comment

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

生成配置的目的是什么?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

为了留底,

因为删除集群只是将状态变更为[已删除],并不会物理删除记录, 因此删除后依然可以在服务配置里查看到备份后的目录

Copy link
Member

Choose a reason for hiding this comment

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

删除集群会删除所有服务以及服务的配置,更改配置是否有必要?

@datasophon datasophon merged commit 10159fe into datavane:dev Aug 10, 2023
1 of 2 checks passed
@88fantasy 88fantasy deleted the Bug-358 branch September 22, 2023 08:45
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.

[Bug] [api] delete cluster
2 participants