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

Do not disturb buffer positions on OffheapStorageArea writes #70

Open
cschanck opened this issue Feb 26, 2020 · 0 comments
Open

Do not disturb buffer positions on OffheapStorageArea writes #70

cschanck opened this issue Feb 26, 2020 · 0 comments

Comments

@cschanck
Copy link
Contributor

Currently, all the write methods in OffheapStorageArea disturb the buffer position of the underlying ByteBuffer. This has the unfortunate side effect of not allowing read operations to proceed while a write is happening, even if they are on non-colliding memory addresses, if those reads/writes happen to share an underyling buffer.

If this is fixed (simple application of slice() or duplicate()), then you could let can allow for reads to happen coincident with writes, assuming you know they are different spans. StampedLocks and optimistic reads, for example.

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

No branches or pull requests

1 participant