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

Resolve transaction trace aggregation race conditions #1166

Merged
merged 8 commits into from Jun 29, 2022

Conversation

JcolemanNR
Copy link
Contributor

@JcolemanNR JcolemanNR commented Jun 23, 2022

Description

We have seen some test runs recently where the slowest transaction trace was not actually captured by the transaction trace aggregator. After reviewing the code there is a potential race condition where two transactions can be set as the 'slowest', but the actual slowest may not be retained due to a lack of locking.

This solution attempts to keep locking to a minimum, while ensuring we actually capture the slowest transaction.

Author Checklist

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)
  • Review Changelog

@JcolemanNR JcolemanNR changed the title Refactor transaction trace aggregation Draft: Refactor transaction trace aggregation Jun 23, 2022
@JcolemanNR JcolemanNR marked this pull request as draft June 23, 2022 23:00
@JcolemanNR JcolemanNR force-pushed the jc/refactor-transaction-trace-aggregator branch from 9e4924e to 4d4a689 Compare June 23, 2022 23:52
@JcolemanNR JcolemanNR changed the title Draft: Refactor transaction trace aggregation Draft: Resolve transaction trace aggregation race conditions Jun 24, 2022
@JcolemanNR JcolemanNR force-pushed the jc/refactor-transaction-trace-aggregator branch from ee31a32 to 153878d Compare June 24, 2022 03:45
@JcolemanNR JcolemanNR force-pushed the jc/refactor-transaction-trace-aggregator branch from 153878d to 04c9233 Compare June 24, 2022 17:33
@JcolemanNR JcolemanNR marked this pull request as ready for review June 28, 2022 17:05
@JcolemanNR JcolemanNR changed the title Draft: Resolve transaction trace aggregation race conditions Resolve transaction trace aggregation race conditions Jun 28, 2022
@JcolemanNR
Copy link
Contributor Author

Needs changelog entry

nr-ahemsath
nr-ahemsath previously approved these changes Jun 28, 2022
Copy link
Member

@nr-ahemsath nr-ahemsath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a very good find. I especially like the additional unit tests that explicitly test the multithreaded scenarios. 🥇

JcolemanNR and others added 2 commits June 28, 2022 16:48
Co-authored-by: Alex Hemsath <57361211+nr-ahemsath@users.noreply.github.com>
Copy link
Member

@nr-ahemsath nr-ahemsath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional changes look good, approved again. 👍

@vuqtran88 vuqtran88 merged commit 9492d02 into main Jun 29, 2022
@vuqtran88 vuqtran88 deleted the jc/refactor-transaction-trace-aggregator branch June 29, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants