shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[BUG] <title> In rulesList, The un-matching request will cause normal requests to fail

Open creabob opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

this is my rule setting in modifyResponse plugin image this is matching case image this is un-matching case without add body info image but after un-matching case, the matching case become un-match image this operates in orders

Expected Behavior

Whenever the request happens, the matching scene should be matched

Steps To Reproduce

  1. in shenyu-master branch
  2. set matching rules
  3. happen one un-matching case
  4. matching case will dismatch

Environment

ShenYu version(s):
master

Debug logs

this is the logs under matching case but un-matching and without modifyResponse rule success match info. image

Anything else?

i have debug in this case, find some questions in this line, why caches an empty ruleData when not match rules. image cacheRuleData(path, emptyRuleData); when i delete this line ,this bug will be fixed. but i am not sure this operate is correct. Can u introduce the original intention of this line which cache empty ruleData?

creabob avatar Jul 04 '24 08:07 creabob

besides, This problem not only exists in this plugin

creabob avatar Jul 04 '24 08:07 creabob

please close rule cache in shenyu-bootstrap.yml

moremind avatar Jul 05 '24 08:07 moremind

please close rule cache in shenyu-bootstrap.yml

so, it is recommended to turn on this rule cache function?

creabob avatar Jul 05 '24 08:07 creabob

please close rule cache in shenyu-bootstrap.yml

so, it is recommended to turn on this rule cache function?

if your rule just exist url condition, you can turn on

moremind avatar Jul 06 '24 14:07 moremind

If I want to use the cache not only under the rules of the url condition, is it supported now?

creabob avatar Jul 17 '24 09:07 creabob

If I want to use the cache not only under the rules of the url condition, is it supported now? next version

moremind avatar Jul 19 '24 05:07 moremind