예제 #1
0
            // Select all P, S, I that are not Down and not Dropped
            private static List <StatefulServiceReplica> GetReplicasForFullDataLoss(List <StatefulServiceReplica> replicaList)
            {
                List <StatefulServiceReplica> targetReplicas = new List <StatefulServiceReplica>();

                foreach (StatefulServiceReplica replica in replicaList)
                {
                    if ((FaultAnalysisServiceUtility.IsPrimaryOrSecondary(replica) || (replica.ReplicaRole == ReplicaRole.IdleSecondary)) &&
                        FaultAnalysisServiceUtility.IsReplicaUp(replica))
                    {
                        targetReplicas.Add(replica);
                    }
                }

                return(targetReplicas);
            }