我正在尝试为我们的SF解决方案升级应用版本。但由于其中一项服务在启动新版本时报告了一个问题,因此多次失败。
以下是我看到的几乎同时发生的两个例外情况:
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().
和
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().
如果&#34; MyUser&#34;发生任何变化,我希望看到这种错误。模型,但它根本没有改变。
不确定是否与我们使用的SF版本存在某些问题:5.7.198,因为这不是最新版本。
任何人都会遇到类似的事情或有好的想法来解决问题?
P.S。这是一个拥有真实客户的生产系统。能够进行升级而不是丢失数据是必须的。因此,重新创建SF /集群不是一种选择。