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

Do not overwrite transactions with the same name #149

Merged
merged 4 commits into from
May 4, 2024

Conversation

kibertoad
Copy link
Collaborator

Changes

Original implementation could potentially overwrite previous transactions that was still running, e. g. when there are concurrent jobs running with the same name.

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary

@kibertoad kibertoad added the minor label May 4, 2024
@kibertoad kibertoad requested a review from eduard-fa May 4, 2024 09:51
@kibertoad kibertoad requested review from CarlosGamero, drdaemos and a team as code owners May 4, 2024 09:51
@kibertoad kibertoad added major and removed minor labels May 4, 2024
@@ -37,7 +38,7 @@ export class NewRelicTransactionManager {
}

this.isEnabled = isNewRelicEnabled
this.transactionMap = new Map()
this.transactionMap = new FifoMap(2000)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there was a potential memory leak in the original implementation, if for whatever reason we do not close the transaction, it will keep hanging in the map forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants