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]: add IReadOnlyStoreView #3642

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

Conversation

nan01ab
Copy link
Contributor

@nan01ab nan01ab commented Dec 22, 2024

Description

Currently DataCache is always used here to access the Store, and DataCache is also used to collect some Put and Delete operations, then commit these operations to Store.

But sometimes, only read-only access to the Store, or caching is not need(because keys just access once), or a global cache is needed(for example: CurrentIndex), so current DataCache implementation may have additional overhead, or some optimization cannot be used.

So, this PR adds IReadOnlyStoreView and it's default implementation ReadOnlyStoreView for future usages.
And this PR doesn't change any of existing implementations or usage(for more review-able).

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

1 participant