Skip to main content

RtVersionConflictException

Namespace: Meshmakers.Octo.Runtime.Contracts

Thrown when a write that carries an expected RtEntity.RtVersion (optimistic concurrency) finds the stored entity at a different version: another writer changed the entity after the caller read it. Nothing was written for the conflicting entity. The caller re-reads the entity, re-applies its change and writes again (typically with one retry).

public class RtVersionConflictException : PersistenceException, ISerializable

Inheritance Object → Exception → PersistenceException → RtVersionConflictException
Implements ISerializable

Remarks:

Distinct from "entity not found" (a missing entity keeps its existing not-found error) and from the silent skip of AttributeNewerThanGuard. In a transactional session the whole transaction is rolled back when the exception leaves the session scope.

Properties​

RtEntityId​

The entity the write was refused for.

public RtEntityId RtEntityId { get; }

Property Value​

RtEntityId

ExpectedRtVersion​

The version the caller expected the stored entity to have.

public ulong ExpectedRtVersion { get; }

Property Value​

UInt64

TargetSite​

public MethodBase TargetSite { get; }

Property Value​

MethodBase

Message​

public string Message { get; }

Property Value​

String

Data​

public IDictionary Data { get; }

Property Value​

IDictionary

InnerException​

public Exception InnerException { get; }

Property Value​

Exception

public string HelpLink { get; set; }

Property Value​

String

Source​

public string Source { get; set; }

Property Value​

String

HResult​

public int HResult { get; set; }

Property Value​

Int32

StackTrace​

public string StackTrace { get; }

Property Value​

String

Constructors​

RtVersionConflictException(RtEntityId, UInt64)​

Creates a new instance of RtVersionConflictException.

public RtVersionConflictException(RtEntityId rtEntityId, ulong expectedRtVersion)

Parameters​

rtEntityId RtEntityId
The entity the write was refused for

expectedRtVersion UInt64
The version the caller expected