From 420bcc41ddcc4e271da644f496ea677c01bffecc Mon Sep 17 00:00:00 2001 From: NicholasCouri Date: Mon, 3 Apr 2023 16:09:25 -0700 Subject: [PATCH] [port v2int 3.4] Fix signal error event in case we reconnect and we miss the first signal (#14944) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …nal (#14939) ## Description Fix regression caused by [Download snapshot with handle before throwing "Fetched snapshot is older than the received ack" by NicholasCouri · Pull Request #14225 · microsoft/FluidFramework · GitHub](https://github.com/microsoft/FluidFramework/pull/14225) in which, if we reconnect, we will send the SendError Logic. WIll work on adding a new test to prevent this error from happening again. [How contribute to this repo](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md). [Guidelines for Pull Requests](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines). The sections included below are suggestions for what you may want to include. Feel free to remove or alter parts of this template that do not offer value for your specific change. ## Description > A concise description of the changes (bug or feature) and their impact/motivation. > If this description is short enough to be used as the title, delete this section and just use the title. > For bug fixes, also include specifics of how to reproduce it / confirm it is fixed. > If this Pull Request should close/resolve any issues when merged, use [the special syntax for that](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) here. ## Breaking Changes > If this introduces a breaking change, please describe the impact and migration path for existing applications below. > See [Breaking-vs-Non-breaking-Changes](https://github.com/microsoft/FluidFramework/wiki/Breaking-vs-Non-breaking-Changes) for details. > If there are no breaking changes, delete this section. ## Reviewer Guidance The review process is outlined on [this wiki page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines). > List any specific things you want to get reviewer opinions on, and anything a reviewer would need to know to review this PR effectively. > Things you might want to include: > > - Questions about how to properly make automated tests for your changes. > - Questions about design choices you made. > - Descriptions of how to manually test the changes (and how much of that you have done). > - etc. > > If you have any questions in this section, consider making the PR a draft until all questions have been resolved. --- packages/runtime/container-runtime/src/containerRuntime.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/runtime/container-runtime/src/containerRuntime.ts b/packages/runtime/container-runtime/src/containerRuntime.ts index 094b0e6a1af8..40d352813388 100644 --- a/packages/runtime/container-runtime/src/containerRuntime.ts +++ b/packages/runtime/container-runtime/src/containerRuntime.ts @@ -1982,12 +1982,13 @@ export class ContainerRuntime clientSignalSequenceNumber: envelope.clientSignalSequenceNumber, }); } else if ( - this.consecutiveReconnects === 0 && envelope.clientSignalSequenceNumber === - this._perfSignalData.trackingSignalSequenceNumber + this._perfSignalData.trackingSignalSequenceNumber ) { // only logging for the first connection and the trackingSignalSequenceNUmber. - this.sendSignalTelemetryEvent(envelope.clientSignalSequenceNumber); + if (this.consecutiveReconnects === 0) { + this.sendSignalTelemetryEvent(envelope.clientSignalSequenceNumber); + } this._perfSignalData.trackingSignalSequenceNumber = undefined; } }