You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
changed the title
[Dynamic Protocol State] Querying data from KV store
[Dynamic Protocol State | M1] Querying data from KV store
Mar 11, 2024
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
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
Snapshot
API, similar to the identity-table.The text was updated successfully, but these errors were encountered: