I am trying to upgrade the app version for one our SF solutions. But failed multiple times as one of the services is reporting an issue during start with the new version.
Here is what I see as 2 exceptions happening almost at the same time:
OnApply
Unexpected service exception. Type: System.TypeInitializationException Message: The type initializer for 'MyCompany.MyService.Interfaces.Models.MyUser' threw an exception. HResult: 0x80131534
Log record. Type: BeginTransaction LSN: 103498
at System.Fabric.Store.TStore`5.OnApplyAdd(TransactionBase txn, MetadataOperationData metadataOperationData, RedoUndoOperationData operationRedoUndo, Boolean isIdempotent, String applyType)
at System.Fabric.Store.TStore`5.<OnRecoveryApplyAsync>d__299.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 System.Fabric.Store.TStore`5.<Microsoft-ServiceFabric-Replicator-IStateProvider2-ApplyAsync>d__237.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 Microsoft.ServiceFabric.Replicator.DynamicStateManager.<OnApplyAsync>d__106.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 Microsoft.ServiceFabric.Replicator.DynamicStateManager.<OnApplyAsync>d__105.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 Microsoft.ServiceFabric.Replicator.OperationProcessor.<ApplyCallback>d__36.MoveNext().
And
Exception in OpenAsync. Type: System.TypeInitializationException Message: The type initializer for 'MyCompany.MyService.Interfaces.Models.MyUser' threw an exception. HResult: 0x80131534. Stack Trace: at Microsoft.ServiceFabric.Replicator.RecoveryManager.<PerformRecoveryAsync>d__31.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 Microsoft.ServiceFabric.Replicator.LoggingReplicator.<PerformRecoveryAsync>d__137.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 Microsoft.ServiceFabric.Replicator.DynamicStateManager.<OpenAsync>d__109.MoveNext().
I would expect to see this kind of error in case any changes happened to the "MyUser" model, but it was not changed at all.
Not sure if it has to do with some kind of an issue with the SF version we are using: 5.7.198 as this is not the latest one.
Anyone faced something similar or have good ideas for a work around?
P.S. This is a production system with real customers. Being able to make upgrades and not loosing their data is a must. Hence re-creation of the SF/cluster is not an option.
User contributions licensed under CC BY-SA 3.0