-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix shutdown race-condition by introducing a flush_timeout before dro…
…pping data (#2821) Resolves: #2556 ### What We've always had a race condition during startup where a viewer might not exist despite a client trying to connect to it. For users of spawn we could have added a bandaid here by probably increasing this sleep: https://github.com/rerun-io/rerun/blob/main/rerun_py/rerun_sdk/rerun/sinks.py#L180 This wouldn't resolve issues for other use-cases of manually launching a viewer and client without tight orchestration. Instead, we introduce a timeout (which can optionally be set to None), to use during the disconnected checks when we are flushing. This gives power-users the option to specify None and reduce risk of losing data (at an increased risk of blocking during flush when things go wrong). This PR also bumps a couple of debug logs up to warnings to make it more clear when data is being dropped. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2821) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2821) - [Docs preview](https://rerun.io/preview/pr%3Ajleibs%2Ftimeout_disconnects/docs) - [Examples preview](https://rerun.io/preview/pr%3Ajleibs%2Ftimeout_disconnects/examples)
- Loading branch information
Showing
11 changed files
with
168 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.