public void DoDumpsterRedeliveryIfRequired(Guid dbGuid) { IADToplogyConfigurationSession iadtoplogyConfigurationSession = ADSessionFactory.CreatePartiallyConsistentRootOrgSession(true); IADDatabase db = iadtoplogyConfigurationSession.FindDatabaseByGuid(dbGuid); IADServer server = iadtoplogyConfigurationSession.FindServerByName(Environment.MachineName); IADDatabaseAvailabilityGroup dag = iadtoplogyConfigurationSession.FindDagByServer(server); ReplayConfiguration replayConfig = RemoteReplayConfiguration.TaskGetReplayConfig(dag, db, server); DumpsterRedeliveryWrapper.DoRedeliveryIfRequired(replayConfig); }
public void TriggerDumpsterEx(Guid dbGuid, bool fTriggerSafetyNet, DateTime failoverTimeUtc, DateTime startTimeUtc, DateTime endTimeUtc, long lastLogGenBeforeActivation, long numLogsLost) { IADToplogyConfigurationSession iadtoplogyConfigurationSession = ADSessionFactory.CreatePartiallyConsistentRootOrgSession(true); IADDatabase db = iadtoplogyConfigurationSession.FindDatabaseByGuid(dbGuid); IADServer server = iadtoplogyConfigurationSession.FindServerByName(Environment.MachineName); IADDatabaseAvailabilityGroup dag = iadtoplogyConfigurationSession.FindDagByServer(server); ReplayConfiguration configuration = RemoteReplayConfiguration.TaskGetReplayConfig(dag, db, server); DumpsterRedeliveryWrapper.MarkRedeliveryRequired(configuration, failoverTimeUtc, startTimeUtc, endTimeUtc, lastLogGenBeforeActivation, numLogsLost); }
public void TriggerDumpster(Guid dbGuid, DateTime inspectorTime) { IADToplogyConfigurationSession iadtoplogyConfigurationSession = ADSessionFactory.CreatePartiallyConsistentRootOrgSession(true); IADDatabase db = iadtoplogyConfigurationSession.FindDatabaseByGuid(dbGuid); IADServer server = iadtoplogyConfigurationSession.FindServerByName(Environment.MachineName); IADDatabaseAvailabilityGroup dag = iadtoplogyConfigurationSession.FindDagByServer(server); ReplayConfiguration configuration = RemoteReplayConfiguration.TaskGetReplayConfig(dag, db, server); DumpsterRedeliveryWrapper.MarkRedeliveryRequired(configuration, inspectorTime, 0L, 0L); }
// Token: 0x06000942 RID: 2370 RVA: 0x0002B914 File Offset: 0x00029B14 private void ScheduleDumpsterRedelivery(object obj) { try { ReplayConfiguration replayConfiguration = obj as ReplayConfiguration; ExTraceGlobals.DumpsterTracer.TraceDebug <string, string>(0L, "DumpsterRedeliveryManager: ScheduleDumpsterRedelivery for {0}({1}).", replayConfiguration.Name, replayConfiguration.Identity); DumpsterRedeliveryWrapper.DoRedeliveryIfRequired(replayConfiguration); } finally { lock (this) { this.m_numOutstandingRequests--; if (this.m_numOutstandingRequests == 0) { this.m_doneEvent.Set(); } } } }
// Token: 0x06001BBF RID: 7103 RVA: 0x0007737C File Offset: 0x0007557C private void UpdateMountAllowedNow(out AutoDatabaseMountDial mountDial, out bool mountDialOverrideUsed) { mountDial = AutoDatabaseMountDial.Lossless; mountDialOverrideUsed = false; if (this.NoLoss) { ExTraceGlobals.ReplicaInstanceTracer.TraceDebug((long)this.GetHashCode(), "MountAllowedNow returns true as NoLoss."); this.MountAllowed = true; return; } bool flag = false; long num = 0L; mountDialOverrideUsed = this.GetLossyMountSettings(ref num, ref flag); this.m_acllPerf.RunTimedOperation(AcllTimedOperation.ProtectUnboundedDataloss, delegate { this.ProtectUnboundedDataloss(); }); if (mountDialOverrideUsed && flag) { ExTraceGlobals.ReplicaInstanceTracer.TraceDebug((long)this.GetHashCode(), "MountDialOverride of BestEffort, allowing Mount now."); } else { mountDial = (AutoDatabaseMountDial)num; flag = (num != 0L && this.NumberOfLogsLost <= num); } if (flag) { this.m_acllPerf.RunTimedOperation(AcllTimedOperation.MarkRedeliveryRequired, delegate { DumpsterRedeliveryWrapper.MarkRedeliveryRequired(this.m_configuration, this.LastLogInspectedTime, this.LastLogShipped, this.NumberOfLogsLost); }); } ExTraceGlobals.ReplicaInstanceTracer.TraceDebug <bool>((long)this.GetHashCode(), "fMountAllowed = {0}", flag); this.MountAllowed = flag; this.MountDialOverrideUsed = mountDialOverrideUsed; }
// Token: 0x06000941 RID: 2369 RVA: 0x0002B670 File Offset: 0x00029870 protected override void TimerCallbackInternal() { List <ReplayConfiguration> list = null; lock (this.m_cacheLock) { if (this.m_allConfigurationsCached == null || this.m_allConfigurationsCached.Count == 0) { ExTraceGlobals.DumpsterTracer.TraceDebug((long)this.GetHashCode(), "DumpsterRedeliveryManager: No configurations have been discovered, so nothing to do! Exiting."); return; } list = new List <ReplayConfiguration>(this.m_allConfigurationsCached); } lock (this) { if (!base.PrepareToStopCalled) { foreach (ReplayConfiguration replayConfiguration in list) { if (replayConfiguration != null) { if (replayConfiguration.Type == ReplayConfigType.RemoteCopySource && replayConfiguration.IsSourceMachineEqual(AmServerName.LocalComputerName)) { Exception ex = null; try { if (DumpsterRedeliveryWrapper.IsRedeliveryRequired(replayConfiguration)) { ExTraceGlobals.DumpsterTracer.TraceDebug <string, string>(0L, "DumpsterRedeliveryManager: Queued dumpster work item for: {0}({1})", replayConfiguration.Name, replayConfiguration.Identity); this.m_numOutstandingRequests++; this.m_doneEvent.Reset(); ThreadPool.QueueUserWorkItem(new WaitCallback(this.ScheduleDumpsterRedelivery), replayConfiguration); } else { ExTraceGlobals.DumpsterTracer.TraceDebug <string, string>(0L, "DumpsterRedeliveryManager: Skipping dumpster request for {0}({1}) since DumpsterRedeliveryRequired is 'false'.", replayConfiguration.Name, replayConfiguration.Identity); } } catch (IOException ex2) { ex = ex2; } catch (ClusterException ex3) { ex = ex3; } catch (DumpsterRedeliveryException ex4) { ex = ex4; } if (ex != null) { ExTraceGlobals.DumpsterTracer.TraceError <string, string, Exception>((long)this.GetHashCode(), "DumpsterRedeliveryManager: Failed checking for dumpster request for {0}({1}). Exception: {2}", replayConfiguration.Name, replayConfiguration.Identity, ex); ReplayCrimsonEvents.DumpsterRedeliveryForDatabaseFailed.LogPeriodic <string, Guid, bool, string, Exception>(replayConfiguration.Identity, DiagCore.DefaultEventSuppressionInterval, replayConfiguration.DatabaseName, replayConfiguration.IdentityGuid, false, ex.Message, ex); } } else { ExTraceGlobals.DumpsterTracer.TraceDebug(0L, "DumpsterRedeliveryManager: Skipping dumpster request for {0}({1}) since node is not active. Config type is {2} and source machine is {3}", new object[] { replayConfiguration.Name, replayConfiguration.Identity, replayConfiguration.Type, replayConfiguration.SourceMachine }); } } } } } }