这是indexloc提供的服务,不要输入任何密码
Skip to content

StateStorageBridge ClearStateAsync does not reset the State property anymore #9619

@tomhreb

Description

@tomhreb

Hello,

we've upgraded from 8.1 to 8.2.1 and found out following change in behavior caused by PR #9417.

ClearStateAsync from StateStorageBridge class does not reset the state to default value anymore.
It is not clear to me whether this is wanted, according to the description in mentioned PR.

IGrainState.State should never be null after returning from an IGrainStorage method without an exception being thrown. That means it should be set to a new instance of T in ReadStateAsync() and ClearStateAsync() before returning if it would otherwise have been null.

Is this a bug or wanted behavior?

In any case, the current behavior is not consistent with MemoryStorage, where the state is still set to default value _activatorProvider.GetActivator<T>().Create().

Thank you
Tomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions