skywalking icon indicating copy to clipboard operation
skywalking copied to clipboard

Topology node type error

Open mbao opened this issue 7 years ago • 5 comments

  • Why do you submit this issue?
  • [ ] Question or discussion

Question

Topology node type error. Node type is set by componentId of the last serviceRelationServerCall has the same target sequence in TopologyBuilder.build method. When the node is a rabbitMQ consumer and sequence of rabbitMQ service has a large start such as 9, serviceRelationServerCall ,of which the componentId is 53, is likely to be the last serviceRelationServerCall. The node type will be rabbitmq-consumer and shown as unknown in topology. I think this serviceRelationServerCall should be filtered.

mbao avatar May 07 '19 03:05 mbao

What do you mean a large start? I am not following.

wu-sheng avatar May 07 '19 03:05 wu-sheng

What do you mean a large start? I am not following.

When using Mysql, serviceRelationServerCalls is sorted by entity_id as a result of group by. So entity_id sorted like 0xxxx 1xxxx 2xxx ...9xxx. image

mbao avatar May 07 '19 04:05 mbao

Then? Why sort affect the result?

wu-sheng avatar May 07 '19 05:05 wu-sheng

Then? Why sort affect the result?

if (nodes.containsKey(target.getSequence())) {
                nodes.get(target.getSequence()).setType(componentLibraryCatalogService.getComponentName(serverCall.getComponentId()));
            }

In build method of TopologyBuilder, last of sorted serviceRelationServerCalls is used to get the Type. Maybe it is enough just to say componentId such like 53(rabbitmq-consumer) should not be used to set the node type. Other words just describe the condition I came across.

mbao avatar May 07 '19 06:05 mbao

If your concern is componentId, you could follow #2534 . Component id is going to be removed in the future. source + dest will be the entity id only.

The number of componentId represents nothing, it is just based on the contribution sequence. So logic should not base on that.

wu-sheng avatar May 07 '19 06:05 wu-sheng