Skip to content

Clearing state on a grain which hasn't been saved to database yet causes AdoNetStorageProvider to crash #3516

@Arshia001

Description

@Arshia001

Calling ClearStateAsync on an AdoNetStorageProvider instance for a grain that has no database entry (no call to WriteStateAsync yet) causes an exception:

Exc level 0: Orleans.Storage.InconsistentStateException: Version conflict (ClearState): ServiceId=xxxxxxxx ProviderName=xxxxxxxx GrainType=xxxxxxxx GrainId=0 ETag=.
   at Orleans.Storage.AdoNetStorageProvider.<ClearStateAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Orleans.Core.GrainStateStorageBridge.<ClearStateAsync>d__8.MoveNext()
Exc level 0: Orleans.Storage.InconsistentStateException: Version conflict (ClearState): ServiceId=xxxxxxxx ProviderName=xxxxxxxx GrainType=xxxxxxxx GrainId=0 ETag=.
   at Orleans.Storage.AdoNetStorageProvider.<ClearStateAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Orleans.Core.GrainStateStorageBridge.<ClearStateAsync>d__8.MoveNext()

Metadata

Metadata

Assignees

Labels

area-persistencecategory for Orleans persistence issuesbug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions