Skip to content

State stores: return a flag to indicate whether the returned value is empty or not present #2727

@ItalyPaleAle

Description

@ItalyPaleAle

Describe the feature

Currently, when a value is not found in a state store, components return an empty response (ie. with an empty data). Because of that, callers are not able to distinguish between an empty value stored in the database, or a missing value.

In the past this was "addressed" by making some state stores refuse to store values that were empty strings. This caused some issues, not least because it was an uneven behavior only in 4 components: #2722

A proper fix would be to add an extra value to the response object from the state stores' get method to indicate whether the value was found.

Such a change would be bacwkards-compatible, but needs to also be implemented in the runtime and possibly the SDKs.

Release Note

RELEASE NOTE: ADD Add flag to state store Get responses to distinguish empty values from missing ones

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions