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 propagation in concurrency scenarios #3845

Merged
merged 2 commits into from
May 4, 2023

Conversation

aduffeck
Copy link
Contributor

@aduffeck aduffeck commented May 4, 2023

With the previous code the propagation code read the parent node before grabbing the according write lock. That had the effect that when a directory was being updated concurrently by different operations the calculations were made on an outdated state, leading to incorrect numbers.

After this change we grab the lock BEFORE actually reading the node which ensures that we always work with the proper data.

Fixes owncloud/ocis#6215

With the previous code the propagation code read the parent node before
grabbing the according write lock. That had the effect that when a
directory was being updated concurrently by different operations the
calculations were made on an outdated state, leading to incorrect
numbers.

After this change we grab the lock BEFORE actually reading the node
which ensures that we always work with the proper data.
@aduffeck aduffeck requested a review from a team as a code owner May 4, 2023 09:05
@update-docs
Copy link

update-docs bot commented May 4, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

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