Giter VIP home page Giter VIP logo

Comments (5)

dosubot avatar dosubot commented on May 28, 2024 3

哈哈,@Eleven-M,又见面了!遇到新问题了吗?希望这次我们也能快乐地解决它!

在Apollo中删除项目后,如果您仍然可以在控制台看到它,并且遇到内部错误,无法重新创建具有相同AppId的项目,可能是由于删除过程没有完全从系统中删除与AppId相关的所有引用或数据。在提供的AppController.java文件中,delete方法使用adminService.deleteApp(entity, operator);来删除应用程序。然而,没有看到adminService.deleteApp和相关服务(如数据库清理程序)的实现,很难确定确切的原因。可能的原因包括:

  1. **缓存:**应用程序或中间件可能正在缓存项目详细信息,并且在删除后未使缓存失效。
  2. **数据库引用:**数据库中可能存在剩余的引用或约束,阻止了项目数据的完全删除,导致不一致。
  3. **异步删除:**如果删除过程是异步的,系统的所有组件可能需要一段时间才能识别到删除。
  4. **删除逻辑中的错误:**删除过程中可能存在逻辑错误,未能删除所有必要的数据或未处理所有情况,特别是如果存在复杂的关系或依赖。

要解决这些问题,请确保:

  • 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

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.

BlackBear2003 avatar BlackBear2003 commented on May 28, 2024

#5076

from apollo.

nobodyiam avatar nobodyiam commented on May 28, 2024

@Eleven-M 请描述下详细的复现步骤

from apollo.

stale avatar stale commented on May 28, 2024

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.

stale avatar stale commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.