Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in DeltaManager.connect() instead of assert #1229

Merged

Conversation

wes-carlson
Copy link
Contributor

Calling resume() on a closed container seems to account for a significant proportion of assertion failures reported. If a container is closed when resume() is called, it calls connectToDeltaStream() which in turn calls deltaManager.connect(), causing an immediate assertion failure since the deltaManager is closed when the container is closed.

@wes-carlson wes-carlson requested a review from vladsud February 11, 2020 21:06
@@ -404,6 +404,9 @@ export class Container extends EventEmitterWithErrorHandling implements IContain
}

public resume() {
if (this.closed) {
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to throw more descriptive error in DeltaManager.connect() and push it to apps to not call resume after then closed container.
Basically no silent failures - it's a bug in their workflow.

@wes-carlson wes-carlson changed the title return on container.resume() if container is closed error in DeltaManager.connect() instead of assert Feb 11, 2020
Copy link
Contributor

@vladsud vladsud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@wes-carlson wes-carlson merged commit cd3caf1 into microsoft:master Feb 11, 2020
@wes-carlson wes-carlson deleted the noop-on-closed-container-resume branch February 11, 2020 22:38
This was referenced Nov 5, 2022
jason-ha pushed a commit that referenced this pull request Jan 23, 2025
#1229)

Bumps [globals](https://github.com/sindresorhus/globals) from 15.11.0 to 15.12.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v15.11.0...v15.12.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants