-
-
Notifications
You must be signed in to change notification settings - Fork 31
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.
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: