Skip to content

Spring Cloud Gateway failed to remove API groups info in GatewayApiMatcherManager when runtime #2468

@Lmqcoder

Description

@Lmqcoder

Issue Description

bug report

Describe what happened (or what feature you want)

Spring Cloud Gateway 使用nacos作为动态数据源,有两个分组信息,在nacos删除一个分组信息后,GatewayApiMatcherManager中的API_MATCHER_MAP还是有两个API分组信息。

Describe what you expected to happen

GatewayApiMatcherManager中的API_MATCHER_MAP应该只有未删除的一个API分组信息。

How to reproduce it (as minimally and precisely as possible)

  1. 启动一个Spring Cloud Gateway ,配置路由1,路由2
  2. 使用nacos作为动态数据源
  3. 在nacos设置API分组1(匹配规则包含路由1),API分组2(匹配规则包含路由2)
  4. 针对分组1设置流控规则1
  5. 访问路由1,流控规则1生效
  6. 在nacos删除API分组1
  7. 访问路由1,流控规则1仍然生效

Tell us your environment

Anything else we need to know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/gateway-flow-controlIssues or PRs related to API gateway flow controlduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions