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

[Dynamic Protocol State | M3] Querying data from KV store #5316

Closed
durkmurder opened this issue Jan 29, 2024 · 1 comment
Closed

[Dynamic Protocol State | M3] Querying data from KV store #5316

durkmurder opened this issue Jan 29, 2024 · 1 comment
Assignees

Comments

@durkmurder
Copy link
Member

Context

KV store was designed to be backward compatible and support multiple versions, to reflect this in the code base we need an version agnostic way to query data. The proposed solution is to use a generic interface which is a combination of all fields that were present across different versions. The concrete implementation of the interface will depend on the actual version which was or is active at the time the snapshot was taken. This approach allows us to use single interface across all supported versions as well as expand them, details on the approach can be found in the design doc.

For fields that are deprecated(not supported anymore) as result of the update or fields that were added(in new version but weren't present in previous one) we have agreed to use sentinel errors to inform caller that value is not available.

Definition of Done

  • Implement a generic, version agnostic interface to represent values in the KV store.
  • Implement a way to query KV store data from Snapshot API, similar to the identity-table.
  • Define sentinel errors to represent unsupported values.
  • Add tests
  • Add a comprehensive godoc that describes how to maintain interface across different versions.
@AlexHentschel
Copy link
Member

My gut feeling is that we might want to allow for a couple iterations over the interface. After all, we want an intuitive and safe API backed by a clean implementation. Not sure, but I would bump this up to 8SP.

@jordanschalm jordanschalm changed the title [Dynamic Protocol State] Querying data from KV store [Dynamic Protocol State | M1] Querying data from KV store Mar 11, 2024
@jordanschalm jordanschalm changed the title [Dynamic Protocol State | M1] Querying data from KV store [Dynamic Protocol State | M3] Querying data from KV store Mar 12, 2024
@durkmurder durkmurder self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants