-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
[New Issue]: Seeing Two collaborative sessions warning occasionally when creating a new file #245
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
This should only happen when two views of the same file are opened simultaneously (even for only one user), for instance a notebook file opened with the notebook editor and with the text editor. |
We've seen this flaky message too in JupyterCAD. It has been especially annoying in our visual regression tests. Given that the end-user cannot do much about it (except pressing "Ok") I would vote for only showing a warning in the console, not in a pop-up window. Pop-up windows should probably be avoided as much as possible. |
The user is advised to close one view, so they can do that.
I don't think end-users have the console opened, so in practice nobody will see this message. But I agree that this behavior is not ideal (see #139 (comment)). Note that I reverted a change that was going even further in this direction. |
I found another possible scenario that this could happen when user just has one view. When the first websocket request fail in line 105 in prepare(), basically if exception is thrown between line 87 to line 105, then this first websocket failed. After that, another websocket get request comes in for same file because UI will retry to establish a new websocket. For the second websocket, in prepare() method, we will find there is an existing fileLoader for this file_id, hence the warning sign will show up when user only have one view of the file. cc @davidbrochart |
Good point, could you write a test that reveals this behavior? |
Closing as fixed by #289, please reopen if it is incorrect. |
Description
We are occasionally observing an error dialog when opening up a new file that says there are two collaborative sessions are created for this file.
![Screenshot 2024-02-26 at 11 42 20 AM (1)](https://private-user-images.githubusercontent.com/4554746/310598580-af1e5ce3-d34f-4a39-aee7-9b83bb42181a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MzA0NzksIm5iZiI6MTcyNDUzMDE3OSwicGF0aCI6Ii80NTU0NzQ2LzMxMDU5ODU4MC1hZjFlNWNlMy1kMzRmLTRhMzktYWVlNy05YjgzYmI0MjE4MWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjRUMjAwOTM5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTIxNmRkZjcxZjIyZGU1OGEzZTllM2M2MDRmNzc0MzA5ZjVhZDg4NDU3NWM5MGExNGE5ZDcwOWE5Yzc1NmUyMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.rCaCKoRAp_xzCJWx2GBeUrqhTJsdMGi3wCFuvvMLBqs)
Reproduce
We haven't found a way to reproduce this reliably. It feels a bit flaky, though I have some suspicion on where this is coming from, mentioned below. Here is are the series of logs we need:
Expected behavior
Dialog should not be popped up when one user is accessing.
Context
Suspects
FileLoaderMapper dict is not thread safe. When there are concurrent calls to create file loader, two file loaders could be created and one of the file loader will be referenced from dict in FileLoaderMapper. Both file loaders could have watcher tasks running and for file loader which is not saved in dict, the last_modified field is incorrect and it will report out-of-band changes all the time.
The text was updated successfully, but these errors were encountered: