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

Use 1 lock to protect entity.subsegments (#181) #182

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

steven-aerts
Copy link
Contributor

Use only one type of lock to protect entity.subsegments.
In the past two different locking mechanisms were used. This can cause
a race condition where the subsegments list was being manipulated while
being read.

*Issue #181

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Use only one type of lock to protect entity.subsegments.
In the past two different locking mechanisms were used.  This can cause
a race condition where the subsegments list was being manipulated while
being read.
Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Thanks a lot! This is definitely needed. I'm slightly worried that now these spots may block for a relatively long time as subsegments are streamed out, but the correctness is more important and we'll have to hope such possible blocking doesn't have a too negative impact on apps.

@anuraaga anuraaga merged commit 24a1875 into aws:master Jul 15, 2020
@steven-aerts steven-aerts deleted the fix_181 branch July 17, 2020 06:41
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.

2 participants