IStatefulServiceReplica.Open上的错误 - 已添加具有相同键的项

时间:2018-04-23 15:42:26

标签: azure-service-fabric service-fabric-actor

我们有两个分区的演员服务。所有空闲辅助副本都处于警告状态,并显示Service Fabric Explorer中的以下消息:

Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus', HealthState='Warning', ConsiderWarningAsError=false.
Replica had multiple failures during open on _cp_3. API call: IStatefulServiceReplica.Open(); Error = System.ArgumentException (-2147024809)
An item with the same key has already been added.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at System.Fabric.BackupRestore.BackupRestoreManagerFactory.GetBackupRestoreManager(IBackupRestoreReplica replica)
   at System.Fabric.BackupRestore.BackupRestoreManagerFactory.GetBackupRestoreManager(IBackupRestoreReplica replica)
   at System.Fabric.KeyValueStoreReplica..ctor(String storeName, LocalStoreSettings localStoreSettings, ReplicatorSettings replicatorSettings, KeyValueStoreReplicaSettings kvsSettings)
   at System.Fabric.KeyValueStoreReplica..ctor(String storeName, LocalStoreSettings localStoreSettings, ReplicatorSettings replicatorSettings, KeyValueStoreReplicaSettings kvsSettings)
   at Microsoft.ServiceFabric.Actors.Runtime.KvsActorStateProvider.OnCreateAndInitializeReplica(StatefulServiceInitializationParameters initParams, Action`1 copyHandler, Action`1 replicationHandler, Func`2 onDataLossHandler, Func`2 restoreCompletedHandler)
   at Microsoft.ServiceFabric.Actors.Runtime.KvsActorStateProviderBase.Microsoft.ServiceFabric.Data.IStateProviderReplica.Initialize(StatefulServiceInitializationParameters initializationParameters)
   at System.Fabric.ServiceFactoryBroker.CreateHelper[TFactory,TReturnValue](IntPtr nativeServiceType, IntPtr nativeServiceName, UInt32 initializationDataLength, IntPtr nativeInitializationData, Guid partitionId, Func`3 creationFunc, Action`2 initializationFunc, ServiceInitializationParameters initializationParameters)
For more information see: http://aka.ms/sfhealth

从一个分区移动到两个分区时,我们首次遇到此错误。解除节点并删除数据是一个临时修复,因为问题在下一次部署时重新出现。

这个问题导致Service Fabric不断尝试启动服务,该服务只停留在"开始,死亡,重复"的永久循环中。

我知道处于IdleSecondary状态的副本意味着它当前正从其他节点获取数据,以便被提升为ActiveSecondary。在我看来,问题与从演员的其他节点获取数据有关。

导致此问题的原因是什么以及如何在将来阻止它?

1 个答案:

答案 0 :(得分:1)

不支持重新分区ActorService。如果要增加分区数,则需要删除该服务,然后重新创建它。

当您说:“从一个分区移动到两个分区。”时,您能否共享有关您实际执行的Service Fabric操作的详细信息?