Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Cannot read state after grain deactivation #1

@crodriguezvega

Description

@crodriguezvega

Hi,

I have included the project Orleans.StorageProvider.DocumentDB in my solution because I am interesting in using this provider. I had to make a small modification on the code to make it build with the release 1.0.10 of Orleans, because it does not include the interface IGrainState anymore. Thus, I changed the references of IGrainState to GrainState.

I am running a scenario where I explicitly deactivate a grain and I activate it again on the next message. When doing that I get an error on line 60 of DocumentDBStorageProvider.cs, which reads:

grainState.SetAll(document.State);

The exception that is thrown is:

{"Object of type 'System.Int64' cannot be converted to type 'System.Int32'."}

The state of my grain includes just an integer:

public class ProcessorState : GrainState {
public int Number { get; set; }
}

The exception is thrown after deactivation has completed and I am sending a new message to the grain expecting it to read the state from DocumentDB and activate again.

I am using DocumentDB client 1.3.0, Orleans 1.0.10 and Newtonsoft.Json 6.0.4.

Thanks.

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