alibaba / alibaba/Sentinel

Invocation tree will be setup at NodeSelectorSlot , each resource will be add to invocation tree only onetime in the same contextname , so how about resource has multiple invocation trees ?

Open
#2,229 0 comments 0 reactions 0 assignees View on GitHub
kind/question
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

As we know , NodeSelectorSlot will create the invocation tree when there is no DefaultNode founding at current contextname .
I have one scenario which is confliced with this rule. I have one resource having more than one invocation tree in the same conextname ,
for example the invocation tree suppsoing to be as below
ControllerA -> resource A [url maybe /controllerA] ,
ControllerB-> resource A [url maybe /controllerB] ,
As the two urls have the same contextname , according to belwo code in NodeSelectorSlot , resourceA will be add to invocation tree for the first request only .
![image](https://user-images.githubusercontent.com/25001207/121184033-40571d80-c897-11eb-8742-8993efe3cdfc.png)
And I tested it , I could only found resouce A in one invocation tree in the sentinel dashboard
![image](https://user-images.githubusercontent.com/25001207/121184970-2ec24580-c898-11eb-8286-ccbdaba8837d.png)

### Describe what happened (or what feature you want)

I am not sure if my scenario or the usage is not correct , I just think if the resource A should be in the both two invocation trees instead of only the first request invocation tree

### Describe what you expected to happen
I think resource A should be in all the invocation trees which has referece to it.

### How to reproduce it (as minimally and precisely as possible)
actually I just use a springboot application , same service(resourceA) requested with two different controllers .resourceA will only show int one invocation tree ,

### Tell us your environment
my sentinel version is 1.7 , and I checked there is no difference between 1.7 and master code .

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start with NodeSelectorSlot and reproduce the Spring Boot scenario using two controllers that reference the same resource under the same context name. Check the Sentinel dashboard invocation trees against the expected result: resource A should appear in every invocation tree that references it; resolve whether this is supported behavior or requires a defined change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.