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

DataAccessorBasedStore is concurrent-unsound. #1636

Open
damooo opened this issue May 4, 2023 · 0 comments
Open

DataAccessorBasedStore is concurrent-unsound. #1636

damooo opened this issue May 4, 2023 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@damooo
Copy link
Contributor

damooo commented May 4, 2023

Description

Currently DataAccessorBasedStore takes care of much of solid-level implementation, and delegates accessing data to a configured accessor.

And current way to make the store concurrent-safe is to layer-over with a locking layer that locks only request-target. It was understood that such locking only provide concurrent-safety for representation-data, and not for solid-level semantics and storage-layout.

For example:

  • Simultanious PUT on a/b/, a/b, can end up creating both aginest uri-semantics. Or Simultanious POST on a/ with slug b, and PUT on a/b/.
  • Simultanious PUT on a/b/c/d or a/b.
  • Simultanious DELETE on a container, and PUT on path of any of it's non-existing children/descendents.
  • etc.

The contention axes are many that, it is possible to corrupt storage layout.
And any kind of layering cannot achieve concurrent-safety. Locking entire chain of containers on outer layer effectively makes store serial one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants