StatefulServiceDescription.HasPersistedState Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether this instance has persisted state.
public bool HasPersistedState { get; set; }
member this.HasPersistedState : bool with get, set
Public Property HasPersistedState As Boolean
Property Value
true
if the instance has persisted state; otherwise, false
.
Remarks
When a FabricReplicator at a secondary replica receives an operation for a persistent service, it must wait for the service to acknowledge that the data has been persisted before it can send that acknowledgment back to the primary. For non-persistent services, the operation can be acknowledged immediately upon receipt.
When a persistent service replica fails, the Service Fabric will not immediately consider that replica as lost because the persistent state for that replica still exists. If the replica is recovered, it can be recreated using the persisted state. In contrast, beginning to build a replacement replica immediately may be costly and unnecessary, especially when the failures are transient. To configure how long Service Fabric should wait for the persistent replica to recover before building a new (replacement) replica from scratch, use the ReplicaRestartWaitDuration parameter. For non-persistent services (those with HasPersistedState set to false
), Service Fabric will immediately begin creating a new replica (since there is no persistent state to recover from, and hence no point in waiting for local recovery).
Applies to
Azure SDK for .NET