Comments (5)
哈哈,@Eleven-M,又见面了!遇到新问题了吗?希望这次我们也能快乐地解决它!
在Apollo中删除项目后,如果您仍然可以在控制台看到它,并且遇到内部错误,无法重新创建具有相同AppId的项目,可能是由于删除过程没有完全从系统中删除与AppId相关的所有引用或数据。在提供的AppController.java
文件中,delete
方法使用adminService.deleteApp(entity, operator);
来删除应用程序。然而,没有看到adminService.deleteApp
和相关服务(如数据库清理程序)的实现,很难确定确切的原因。可能的原因包括:
- **缓存:**应用程序或中间件可能正在缓存项目详细信息,并且在删除后未使缓存失效。
- **数据库引用:**数据库中可能存在剩余的引用或约束,阻止了项目数据的完全删除,导致不一致。
- **异步删除:**如果删除过程是异步的,系统的所有组件可能需要一段时间才能识别到删除。
- **删除逻辑中的错误:**删除过程中可能存在逻辑错误,未能删除所有必要的数据或未处理所有情况,特别是如果存在复杂的关系或依赖。
要解决这些问题,请确保:
adminService.deleteApp
和任何相关服务的删除逻辑正确处理所有必要的清理,包括数据库记录和任何缓存。- 检查任何可能延迟删除过程的异步操作或事件驱动机制,并确保它们成功完成。
- 检查数据库模式中可能阻止删除的任何外键约束或引用,并确保它们得到适当处理。
没有adminService.deleteApp
和相关组件的实现细节,这些都是基于Web应用程序中与删除操作相关的常见问题的推测性解决方案。
参考资料:
adminService.deleteApp
方法在Apollo代码库中的确切实现是:
@Transactional
public void deleteApp(App app, String operator) {
String appId = app.getAppId();
logger.info("{} is deleting App:{}", operator, appId);
List<Cluster> managedClusters = clusterService.findParentClusters(appId);
// 1. delete clusters
if (Objects.nonNull(managedClusters)) {
for (Cluster cluster : managedClusters) {
clusterService.delete(cluster.getId(), operator);
}
}
// 2. delete appNamespace
appNamespaceService.batchDelete(appId, operator);
// 3. delete app
appService.delete(app.getId(), operator);
}
参考资料:
Sources
- apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java
- apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AdminService.java
About Dosu
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.
from apollo.
from apollo.
@Eleven-M 请描述下详细的复现步骤
from apollo.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.
from apollo.
This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.
from apollo.
Related Issues (20)
- Portal 模块 RestTemplate 支持配置 ConnectionTimeToLive
- apollo2.1.0集成pgsql,求给一份pgsql的sql文件。mysql的不可以用 HOT 4
- 无法删除旧的配置 HOT 7
- 在项目namespace数量比较多的情况下(大约1000个),打开页面加载速度很慢,比较影响用户体验,这个是否有什么优化改进方案? HOT 7
- Apollo是否可以支持按照key维度来发布? HOT 3
- 1.8.0,接入一个app.id 使用多个namespace的时候,多个namesapce均开启了accesskey.sercet,这时候接入的配置代码要怎么写呢 HOT 3
- OidcLocalUserService throw an Exception when executing createLocalUser in OIDC profile HOT 6
- 麻烦问下,有什么办法能同时读到多个环境同一个配置的值吗? HOT 3
- 使用客户端添加string类型的配置项时会报错 HOT 1
- 配置从 2.1.0导出,导入到 2.2.0,数据中时间解析失败 HOT 1
- 在 apollo-portal统一增加访问路径的前缀/apollo 时,导入配置的请求url 有部分没有添加前缀 HOT 1
- apollo-portal 使用统一前缀/apollo以后,创建集群失败 HOT 1
- k8s部署apollo 接入ldap报错 HOT 1
- 请问有大佬已经在2.2.0版本上,数据源由mysql切换至pg了嘛? HOT 1
- 脚本启动与停止的问题 HOT 3
- 删除App后,相似的AppID权限异常,并无法恢复 HOT 4
- dockerfile基础镜像漏洞 HOT 4
- 使用docker安装apollo 镜像里面的demo.sh缺少读取环境变量的逻辑 HOT 1
- yml读取k-v的值错误 HOT 2
- Beautify Portal TraceLog UI interface
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo.