Exemplo n.º 1
0
        private void UpdateWatermark(T batch)
        {
            string         fullLogName   = batch.FullLogName;
            IWatermarkFile watermarkFile = this.logManager.FindWatermarkFileObject(fullLogName);

            if (watermarkFile != null)
            {
                watermarkFile.WriteWatermark(batch.LogRanges);
                return;
            }
            string message = string.Format("DatabaseWriter failed to get a watermark instance for {0}", fullLogName);

            ExTraceGlobals.WriterTracer.TraceError((long)this.GetHashCode(), message);
            EventLogger.Logger.LogEvent(LogUploaderEventLogConstants.Tuple_MissingWatermark, fullLogName, new object[]
            {
                fullLogName
            });
            Tools.DebugAssert(false, "WatermarkFile.GetInstanceBasedOnLogName " + fullLogName);
        }