Issue Description
Describe what happened (or what feature you want)
- First, when I want to construct one invocation tree like following :
- then, there is in-complete tree i get by invoking DefaultNode.printDefaultNode();
- following is what i got:
Entry-entrance(t:0 pq:2.0 bq:0.0 tq:2.0 rt:3.5 1mp:2 1mb:0 1mt:2)
-nodeB(thread:0 pq:1.0 bq:0.0 tq:1.0 rt:0.0 1mp:1 1mb:0 1mt:1)
-nodeA(thread:0 pq:1.0 bq:0.0 tq:1.0 rt:7.0 1mp:1 1mb:0 1mt:1)
--nodeC(thread:0 pq:2.0 bq:0.0 tq:2.0 rt:0.0 1mp:2 1mb:0 1mt:2)
Describe what you expected to happen
- I thing there must be something wrong with the design of NodeSelectSlot.
- There should be a complete invocation tree.
How to reproduce it (as minimally and precisely as possible)
- following is my testing code:
@Test
public void invocationChain() {
Context context = ContextUtil.enter("entrance");
nodeA();
nodeB();
context.getEntranceNode().printDefaultNode();
context.exit();
}
private void nodeA() {
if (SphO.entry("nodeA")) {
try {
nodeC();
} finally {
SphO.exit();
}
}
}
private void nodeB() {
if (SphO.entry("nodeB")) {
try {
nodeC();
} finally {
SphO.exit();
}
}
}
private void nodeC() {
if (SphO.entry("nodeC")) {
try {
System.out.println("nodeC");
} finally {
SphO.exit();
}
}
}
static {
List<String> list = Lists.newArrayList(Arrays.asList("nodeA", "nodeB", "nodeC"));
List<FlowRule> rules = Lists.newArrayList();
for(String str : list) {
FlowRule rule1 = new FlowRule();
rule1.setResource(str);
rule1.setCount(2);
rule1.setGrade(RuleConstant.FLOW_GRADE_QPS);
rule1.setLimitApp("default");
rules.add(rule1);
}
FlowRuleManager.loadRules(rules);
}
Tell us your environment
Anything else we need to know?
暂无答案!
目前还没有任何答案,快来回答吧!