Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not use trace object during processTraceDecisions #1423

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Nov 12, 2024

Which problem is this PR solving?

Since we have delayed trace decision publication and sending a trace, processTraceDecisions may be processing the same trace as sendTraces which causes concurrent access to the span.Data map.

This PR changes the processTraceDecisions to get trace decision information only from the TraceDecision object and only record a trace decision if it doesn't exist in the decision cache

Short description of the changes

  • implement cache.KeptTrace interface for TraceDecision
  • only record a trace decision if it doesn't exist in the decision cache

@VinozzZ VinozzZ requested a review from a team as a code owner November 12, 2024 18:28
@VinozzZ VinozzZ added the type: enhancement New feature or request label Nov 12, 2024
@VinozzZ VinozzZ added this to the v2.9 milestone Nov 12, 2024
@VinozzZ VinozzZ merged commit c3c1b88 into main Nov 12, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong/fix_concurrent_map_access branch November 12, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants