From 611d86d2bae3cf01eb927b5c24ac590c706aee42 Mon Sep 17 00:00:00 2001 From: Paul Leathers Date: Fri, 11 Feb 2022 12:45:01 -0800 Subject: [PATCH] Eliminate noisy LastSummaryProposedHandleMismatch events (#9107) Don't bother logging LastSummaryProposedHandleMismatch when there is no lastSummaryProposalHandle to compare the new handle to, which is true if this instance of OdspSummaryUploadManager hasn't written a summary before. Only log on a positive mismatch. --- packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts b/packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts index 6ad251364d93..225dd9a1aa8b 100644 --- a/packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts +++ b/packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts @@ -46,7 +46,9 @@ export class OdspSummaryUploadManager { public async writeSummaryTree(tree: api.ISummaryTree, context: ISummaryContext) { // If the last proposed handle is not the proposed handle of the acked summary(could happen when the last summary get nacked), // then re-initialize the caches with the previous ones else just update the previous caches with the caches from acked summary. - if (context.proposalHandle !== this.lastSummaryProposalHandle) { + // Don't bother logging if lastSummaryProposalHandle hasn't been set before; only log on a positive mismatch. + if (this.lastSummaryProposalHandle !== undefined && + this.lastSummaryProposalHandle !== context.proposalHandle) { this.mc.logger.sendTelemetryEvent({ eventName: "LastSummaryProposedHandleMismatch", ackedSummaryProposedHandle: context.proposalHandle,