Skip to content

Commit

Permalink
Eliminate noisy LastSummaryProposedHandleMismatch events (#9107)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pleath authored Feb 11, 2022
1 parent 010b576 commit 611d86d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/drivers/odsp-driver/src/odspSummaryUploadManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 611d86d

Please sign in to comment.