springmvc adaptor didn't exit context when request is blocked #1350
Labels
area/integrations
Issues or PRs related to integrations with open-source components
kind/bug
Category issues or prs related to bug.
Milestone
Issue Description
Add one flow rule with callerA, if one request from callerA is blocked,
there are some chances that the next requests from other caller will be still blocked,
since the context didn't exit and the web server(e.g. tomcat) may reuse thread.
Describe what you expected to happen
Request from other caller shoud be passed,
and the context should be exit when one request is completed.
How to reproduce it (as minimally and precisely as possible)
I fount it in
SentinelSpringMvcIntegrationTest#testOriginParser
, the third case with"/foo/3" url and no header, and wondering why it expects blocked.
Reproduce it in demo:
Modify the
InterceptorConfig#Line62
insentinel-demo-spring-webmvc
config.setOriginParser(request -> request.getHeader("S-user"));
toconfig.setOriginParser(request -> request.getParameter("S-user"));
Start web demo and dashboard
Add a flow rule for resource
GET:/hello
, with caller "aaa" and threshold "0"Visit
/host:port/hello?S-user=aaa
, and it will be blocked by Sentinel,then visit
/host:port/hello?S-user=bbb
or/host:port/hello
for many times, they will be blocked occasionally.The text was updated successfully, but these errors were encountered: