Dela via


VolatileActorStateProvider.IStateProvider.GetLastCommittedSequenceNumber Method

Definition

Obtains the last sequence number that the service has committed.

long IStateProvider.GetLastCommittedSequenceNumber ();
abstract member System.Fabric.IStateProvider.GetLastCommittedSequenceNumber : unit -> int64
override this.System.Fabric.IStateProvider.GetLastCommittedSequenceNumber : unit -> int64
Function GetLastCommittedSequenceNumber () As Long Implements IStateProvider.GetLastCommittedSequenceNumber

Returns

Returns Int64.

Implements

Remarks

This method is called on a service when it first starts up, in case it has any persistent state, and when data loss is suspected. When a stateful service replica starts up, it has the option to restore any data that might have persisted from previous updates. If it restores some state in this manner, its current progress is the last written sequence number for that data. A volatile service can simply return 0. Note that this method is not called to determine a new primary election during fail-over, because the current committed progress is already known by the FabricReplicator class at that time.

Applies to