Skip to content

chore: Implement snapshot method on data store #268

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

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

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner May 15, 2025 21:07
@keelerm84 keelerm84 force-pushed the mk/sdk-1252/improved-ro-store branch from 07508b7 to a4a5472 Compare May 16, 2025 15:57
@@ -300,6 +301,32 @@ func (s *Store) getActive() subsystems.ReadOnlyStore {
return s.active
}

//nolint:revive // Implementation for ReadOnlyDataStore.
func (s *Store) Snapshot() (
Copy link
Member Author

Choose a reason for hiding this comment

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

When the relay tries to grab information from the store to determine what it should play back, it needs to get all the store information along with the selector in consistent fashion. Doing so increases data consistency but also will make some implementation details easier in the relay which you will see in the related PR here.

//
// This field is not stable, and not subject to any backwards compatibility guarantees or semantic versioning.
// It is not suitable for production usage. Do not use it. You have been warned.
type ReadOnlyDataStore interface {
Copy link
Member Author

Choose a reason for hiding this comment

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

This name is not ideal. I realize this. I would welcome suggestions but also I'm making it clear you shouldn't be doing anything with this unless you are us.

Choose a reason for hiding this comment

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

I'd go with a part of the name that describes the snapshotable-ness / transactional-ness of the read.

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.

2 participants