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

changes should use a channel to update files atomically #1402

Closed
butonic opened this issue Aug 11, 2020 · 4 comments
Closed

changes should use a channel to update files atomically #1402

butonic opened this issue Aug 11, 2020 · 4 comments

Comments

@butonic
Copy link
Member

butonic commented Aug 11, 2020

to get rid of the mutex we should use a channel to queue writes and reads to the data.

see owncloud/ocis-accounts#82 and owncloud/ocis-accounts#72

@jvillafanez
Copy link
Member

I don't see a big benefit from the change. From my point of view, it's a different way to do the same thing, which is serializing all the reads and writes.

Using RLock and RUnlock should perform better since read requests won't block unless there is a write request (Lock/Unlock) ongoing. This allows reading data from multiple requests in parallel and without blocking eachother. Basically, reads should use RLock/RUnlock while writes should use Lock/Unlock.
The only point that it isn't clear from the docs is if it's possible to have a write starvation if read requests keep coming.

@haribhandari07 haribhandari07 transferred this issue from owncloud/ocis-accounts Jan 25, 2021
@micbar micbar mentioned this issue Feb 17, 2021
16 tasks
@phil-davis
Copy link
Contributor

@butonic this is an old issue that was transferred from the archived ocis-accounts repo a few weeks ago.
Please close if no longer relevant.

@settings settings bot removed the p3-medium label Apr 7, 2021
@stale
Copy link

stale bot commented Jun 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status:Stale label Jun 6, 2021
@stale stale bot closed this as completed Jun 16, 2021
@stale stale bot removed the Status:Stale label Jun 18, 2021
@stale
Copy link

stale bot commented Aug 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status:Stale label Aug 17, 2021
@stale stale bot closed this as completed Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants