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

Add transaction support to cache #442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cipherboy
Copy link
Member

Cache is a layer over the top of the physical storage backend (but below barrier encryption) to reduce strain of repeated read operations on the backend.

We implement transactions by wrapping the underlying physical transaction with a new (empty) cache. This means that we may not have the data locality in oft-read paths, but means that the cache is internally consistent (and that the transaction's cache doesn't need to be merged back into the primary cache). In the future, this could be improved.

@cipherboy cipherboy added pr/no-changelog core/storage Relating to physical storage backends labels Jul 28, 2024
@cipherboy cipherboy added this to the 2.1.0 - Beta milestone Jul 28, 2024
@cipherboy cipherboy requested review from JanMa and DanGhita July 28, 2024 00:13
@cipherboy cipherboy mentioned this pull request Jul 28, 2024
19 tasks
@cipherboy cipherboy added the enhancement New feature or request label Jul 28, 2024
Copy link
Member

@JanMa JanMa left a comment

Choose a reason for hiding this comment

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

LGTM

sdk/physical/cache.go Outdated Show resolved Hide resolved
Cache is a layer over the top of the physical storage backend (but below
barrier encryption) to reduce strain of repeated read operations on the
backend.

We implement transactions by wrapping the underlying physical
transaction with a new (empty) cache. This means that we may not have
the data locality in oft-read paths, but means that the cache is
internally consistent (and that the transaction's cache doesn't need
to be merged back into the primary cache). In the future, this could be
improved.

Signed-off-by: Alexander Scheel <[email protected]>
@cipherboy
Copy link
Member Author

@JanMa @DanGhita This is ready for re-review. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/storage Relating to physical storage backends enhancement New feature or request pr/no-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants