Skip to content

Incomplete grainType when activating generic grains #1579

Description

@jasonholloway

Hello,

It seems that generic grains can never have their state loaded properly on activation, as the various PlacementDirectors that produce the grainType string to be used in retrieving the grain from storage are all without generic type information for the grain in question, and therefore produce grainTypes with generic args missing.

This contrasts with explicitly calling ReadStateAsync() and WriteStateAsync() from the grain itself, which, via GrainStateStorageBridge, produces a fully-specified grainType each time.

The upshot is, state is written to one storage key, but loaded from another in the case of activation.

There's a simple enough workaround in calling ReadStateAsync() from each generic grain's OnActivateAsync() - but this isn't fantastic, obviously.

Does this sound right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions