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 network object sharing race condition within the same process #537

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

lyonsil
Copy link
Member

@lyonsil lyonsil commented Oct 6, 2023

This change is Reviewable

Copy link
Member Author

@lyonsil lyonsil left a comment

Choose a reason for hiding this comment

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

Prior to this change, we were not allowing a get and set (or two gets or two sets) for the same network object to run simultaneously in the same process. That creates a race condition where if one task calls get for network object X, then while waiting on the server to respond another task in the same process calls set for X, the set call will hang until the get times out.

After this change, we still prevent multiple gets or multiple sets for the same network object to run at the same time in the same process. This is desired so that we don't flood the network with duplicate calls or end up with orphaned data structures that get overwritten with duplicates in maps. However, we will now allow a get and a set to run simultaneously for the same object.

Reviewable status: 0 of 1 files reviewed, all discussions resolved

Copy link
Member

@tjcouch-sil tjcouch-sil left a comment

Choose a reason for hiding this comment

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

:lgtm: thank you!!

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@lyonsil lyonsil merged commit 2c3fea0 into main Oct 6, 2023
6 checks passed
@lyonsil lyonsil deleted the 439-network-object-sharing branch October 6, 2023 17:51
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.

Can't access data provider from another extension if your extension starts first
2 participants