Skip to content

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

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

Closed
Lmqcoder opened this issue Nov 29, 2021 · 1 comment · Fixed by #2436
Labels
area/gateway-flow-control Issues or PRs related to API gateway flow control duplicate This issue or pull request already exists

Comments

@Lmqcoder
Copy link

Lmqcoder commented Nov 29, 2021

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?

@sczyh30 sczyh30 linked a pull request Nov 29, 2021 that will close this issue
@sczyh30 sczyh30 added area/gateway-flow-control Issues or PRs related to API gateway flow control duplicate This issue or pull request already exists labels Nov 29, 2021
@sczyh30
Copy link
Member

sczyh30 commented Nov 29, 2021

Thanks for reporting! See #2433, #2436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-flow-control Issues or PRs related to API gateway flow control duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants