apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.08k stars 10.2k forks source link

删除项目后,无法新建同名项目 #5074

Closed annawhiteyellow closed 8 months ago

annawhiteyellow commented 8 months ago

删除项目后,项目数据无法彻底清除,同时无法新建同名项目

dosubot[bot] commented 8 months ago

🤖

你好 @annawhiteyellow,我是Dosu,一个可以帮助你解决问题,回答问题,甚至成为贡献者的机器人。在等待人类维护者的过程中,我会在这里帮助你。很高兴能为你服务!

根据我对Apollo配置管理系统的理解,当一个项目被删除时,与之相关的权限也会被删除。这是通过RolePermissionService接口中的deleteRolePermissionsByAppIddeleteRolePermissionsByAppIdAndNamespace方法实现的。这两个方法用于删除与特定应用ID相关的权限,这里的应用ID可以被视为项目。

以下是相关的代码:

/**
 * delete permissions when delete app.
 */
void deleteRolePermissionsByAppId(String appId, String operator);

/**
 * delete permissions when delete app namespace.
 */
void deleteRolePermissionsByAppIdAndNamespace(String appId, String namespaceName, String operator);

这些方法表明,当一个应用(或项目)被删除时,与之相关的权限也会被删除。然而,这并不一定意味着项目本身被删除,可能只是与之相关的权限被删除。要得到确定的答案,我们需要查看更多的代码库。

关于无法新建同名项目的问题,我没有在Apollo的代码库中找到直接的答案。可能的原因是Apollo在删除项目时,并没有完全清除项目的数据,因此无法创建与已删除项目同名的新项目。这可能是为了防止误删后的数据恢复,或者是为了保持项目名称的唯一性。

如果你需要更详细的解答或者有其他问题,欢迎继续提问。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

nobodyiam commented 8 months ago
image

使用管理员工具删除

annawhiteyellow commented 8 months ago

谢谢,1.9.2版本存在此问题,升级到2.1.0版本后,可以正常删除和新建同名项目