Skip to content

Fix duplicate calls in EndpointTopologyBuilder#13816

Merged
wu-sheng merged 3 commits intomasterfrom
fix/endpoint-topology-dedup-calls
Apr 14, 2026
Merged

Fix duplicate calls in EndpointTopologyBuilder#13816
wu-sheng merged 3 commits intomasterfrom
fix/endpoint-topology-dedup-calls

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng commented Apr 14, 2026

Fix duplicate calls in endpoint topology query results

  • Add a unit test to verify that the fix works.
  • Explain briefly why the bug exists and how to fix it.

EndpointTopologyBuilder.build() created a new Call for every CallDetail without deduplication.
Unlike ServiceTopologyBuilder which uses a HashMap<String, Call> to deduplicate by relation ID,
EndpointTopologyBuilder blindly added every record — causing duplicate call entries when storage
returns multiple records for the same endpoint relation.

The fix adds the same HashMap<String, Call> dedup pattern. E2E expected files are also updated
from contains to containsOnce with | noDuplicates for topology nodes and calls to enforce
strict 1:1 matching and catch any duplicates. Infra-e2e bumped to ef073ad to include the
noDuplicates pipe function.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

…te in e2e

EndpointTopologyBuilder.build() created a new Call for every CallDetail
without deduplication, unlike ServiceTopologyBuilder which uses a HashMap.
This caused duplicate call entries when storage returns multiple records
for the same endpoint relation.

Also switch all dependency topology e2e expected files from `contains`
to `containsOnce` to enforce strict 1:1 matching and catch duplicates.
… files

Upgrade skywalking-infra-e2e to include the noDuplicates pipe function.
Add | noDuplicates to all dependency topology expected files for both
nodes and calls, ensuring storage-level duplicates are caught in e2e.
@wu-sheng wu-sheng added bug Something isn't working and you are sure it's a bug! backend OAP backend related. labels Apr 14, 2026
@wu-sheng wu-sheng added this to the 10.5.0 milestone Apr 14, 2026
@wu-sheng wu-sheng merged commit b4a8811 into master Apr 14, 2026
419 of 421 checks passed
@wu-sheng wu-sheng deleted the fix/endpoint-topology-dedup-calls branch April 14, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. bug Something isn't working and you are sure it's a bug!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants