-
Notifications
You must be signed in to change notification settings - Fork 401
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
Conversation
新增集群状态[停止],当服务全停止时集群会改为停止状态, 此时可以删除集群
新增集群状态[删除中][已删除],当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]
新增集群状态[删除中][已删除],当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]
datasophon-dao/src/main/java/com/datasophon/dao/enums/ClusterState.java
Outdated
Show resolved
Hide resolved
datasophon-common/src/main/java/com/datasophon/common/enums/ClusterCommandType.java
Outdated
Show resolved
Hide resolved
ClusterServiceRoleGroupConfig config = clusterServiceRoleGroupConfigService.getConfigByRoleGroupId(roleInstance.getRoleGroupId()); | ||
List<ServiceConfig> oldConfigs = ProcessUtils.getServiceConfig(config); | ||
Map<Generators, List<ServiceConfig>> configFileMap = new ConcurrentHashMap<>(); | ||
ProcessUtils.generateConfigFileMap(configFileMap, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
生成配置的目的是什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为了留底,
因为删除集群只是将状态变更为[已删除],并不会物理删除记录, 因此删除后依然可以在服务配置里查看到备份后的目录
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除集群会删除所有服务以及服务的配置,更改配置是否有必要?
rename
修改为删除所有服务及集群
code clean
Purpose of the pull request
fix #358
Brief change log
新增集群状态[停止][删除中][已删除]
当服务全停止时集群会改为停止状态, 此时可以删除集群
当删除集群时会切换为[删除中],并发送命令将数据文件夹重命名,最后移除集群主机并置[已删除]
Verify this pull request
This pull request is code cleanup without any test coverage.