private void SetSeedingStartedErrorMessage(RpcSeederArgs rpcSeederArgs) { string[] argumentsWithDb = ReplicaInstanceContext.GetArgumentsWithDb(new string[] { rpcSeederArgs.ToString() }, this.m_displayName); ExEventLog.EventTuple tuple_SeedInstanceStartedSetBroken = ReplayEventLogConstants.Tuple_SeedInstanceStartedSetBroken; int num; string value = tuple_SeedInstanceStartedSetBroken.EventLogToString(out num, argumentsWithDb); this.FailureInfo.SetBroken(tuple_SeedInstanceStartedSetBroken, new LocalizedString(value), null); this.FailureInfo.PersistFailure(this.m_replayState); }
// Token: 0x06001B15 RID: 6933 RVA: 0x000744C4 File Offset: 0x000726C4 public void PrepareDbSeedAndBegin(RpcSeederArgs seederArgs) { ExTraceGlobals.SeederServerTracer.TraceDebug((long)this.GetHashCode(), "SeedManager: PrepareDbSeedAndBegin() called."); SeederInstanceContainer seederInstanceContainer; bool flag = this.m_seederInstances.TryGetInstance(seederArgs.InstanceGuid, out seederInstanceContainer); if (flag) { this.ThrowExceptionForExistingInstance(seederArgs, seederInstanceContainer); } ExTraceGlobals.SeederServerTracer.TraceDebug <string, Guid>((long)this.GetHashCode(), "SeedManager: A SeederInstanceContainer does NOT already exist for DB '{0}' ({1}).", seederArgs.DatabaseName, seederArgs.InstanceGuid); Dependencies.ADConfig.Refresh("SeedManager.PrepareDbSeedAndBegin"); ReplayConfiguration replayConfiguration; this.CheckDbValidReplicationTarget(seederArgs, out replayConfiguration); ConfigurationArgs configurationArgs = new ConfigurationArgs(replayConfiguration, this.m_replicaInstanceManager); seederInstanceContainer = new SeederInstanceContainer(seederArgs, configurationArgs); try { this.m_seederInstances.AddInstance(seederInstanceContainer); ReplayEventLogConstants.Tuple_SeedInstancePrepareAdded.LogEvent(null, new object[] { configurationArgs.Name, seederArgs.ToString() }); } catch (ArgumentException arg) { ExTraceGlobals.SeederServerTracer.TraceError <string, ArgumentException>((long)this.GetHashCode(), "SeedManager: SeederInstanceContainer for db '{0}' has already been added. This indicates another PrepareDbSeed() call got to add it just before this one. Ex: {1}", replayConfiguration.Name, arg); throw new SeederInstanceAlreadyAddedException(seederInstanceContainer.SeedingSource); } try { seederInstanceContainer.PrepareDbSeed(); ReplayEventLogConstants.Tuple_SeedInstancePrepareSucceeded.LogEvent(null, new object[] { configurationArgs.Name }); } finally { SeederState seedState = seederInstanceContainer.SeedState; if (seedState != SeederState.SeedPrepared) { this.m_seederInstances.RemoveInstance(seederInstanceContainer); ExTraceGlobals.SeederServerTracer.TraceDebug <string, SeederState>((long)this.GetHashCode(), "SeedManager: SeederInstanceContainer for db '{0}' is being removed from table because PrepareDbSeed() did not pass (state ={1}, expected was SeedPrepared).", replayConfiguration.Name, seedState); ReplayEventLogConstants.Tuple_SeedInstancePrepareUnknownError.LogEvent(null, new object[] { configurationArgs.Name }); } } ExTraceGlobals.SeederServerTracer.TraceDebug <string>((long)this.GetHashCode(), "SeedManager: SeederInstanceContainer for db '{0} is being queued for seeding since PrepareDbSeed() passed.", replayConfiguration.Name); try { seederInstanceContainer.BeginDbSeed(); ReplayEventLogConstants.Tuple_SeedInstanceBeginSucceeded.LogEvent(null, new object[] { configurationArgs.Name }); } finally { SeederState seedState2 = seederInstanceContainer.SeedState; if (seedState2 != SeederState.SeedInProgress && seedState2 != SeederState.SeedSuccessful) { this.m_seederInstances.RemoveInstance(seederInstanceContainer); ExTraceGlobals.SeederServerTracer.TraceDebug <string, SeederState>((long)this.GetHashCode(), "SeedManager: SeederInstanceContainer for db '{0}' is being removed from table because BeginDbSeed() did not pass (state = {1}).", replayConfiguration.Name, seedState2); ReplayEventLogConstants.Tuple_SeedInstanceBeginUnknownError.LogEvent(null, new object[] { configurationArgs.Name }); } } }