jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.12k stars 3.34k forks source link

JupyterLab collaborative mode sometimes deletes files randomly #11662

Open invisibleroads opened 2 years ago

invisibleroads commented 2 years ago

Sometimes it seems like JupyterLab collaborative mode deletes files (or replaces them with empty files) randomly. I suspect it could be a race condition during saves. I haven't been able to duplicate reliably yet but there is no other explanation as to why a file that is being edited with collaborative mode in two different browser windows on the same machine sometimes results in the file being replaced with an empty file.

I noticed the same problem around August but thought it was a freak occurrence, but it has happened a few more times since so there must be a bug.

jupyterlab == 3.2.5

welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

krassowski commented 2 years ago

Thanks for reporting @invisibleroads! It looks like this one was already reported in #10962 (and is being worked on, but still work in progress). If it you agree that this looks like the same problem, I would like to label this one as a duplicate so we can focus discussion and updates in the earlier issue.

davidbrochart commented 2 years ago

I think saving documents "from the backend" when y-py is ready will solve this kind of issue. See #11599 and https://github.com/yjs/y-crdt/pull/56.

goeppinger commented 2 years ago

I have the same problem with jupyterlab==3.2.5

With 2 differents laptop viewing the same file in jupyterlab with RTC enabled, and suddenly the file was empty.

meeseeksmachine commented 2 years ago

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/plans-on-bringing-rtc-to-jupyterhub/9813/13

entropitor commented 2 years ago

I believe this is solved with https://github.com/jupyterlab/jupyterlab/pull/11901

invisibleroads commented 2 years ago

This is good news!

On Wed, Feb 16, 2022, 08:48 Jens Claes @.***> wrote:

I believe this is solved with #11901 https://github.com/jupyterlab/jupyterlab/pull/11901

— Reply to this email directly, view it on GitHub https://github.com/jupyterlab/jupyterlab/issues/11662#issuecomment-1041509289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACBDLCBTH2EPXHUFJ2GFATU3OTJFANCNFSM5J2JL4VQ . You are receiving this because you were mentioned.Message ID: @.***>

youngchanpark commented 2 years ago

Hello,

According to @jtpio in https://github.com/jupyterlab/jupyterlab/pull/11901#issuecomment-1047114949, this should be fixed from jupyterlab==3.3.0. jupyterlab==3.3.0 has been uploaded to PyPI, so safe to assume this bug is fixed and resolved?

Is this issue safe to close now?

davidbrochart commented 2 years ago

I don't think so, see #12154.

fperez commented 2 years ago

Quick note @davidbrochart - my report of #12154 was based on 3.2.9, we didn't have 3.3.0 at the time. So I can't really confirm one way or another how 3.3.0 would impact that case. I remain curious as to 3.3.0 alone will help, or whether we also need #11599 to go in... @echarles also mentioned not being 💯 sure that #11599 would be the whole story - until we have a perfect way to replicate the problem, it's hard to tell.

We are setting up a separate testing hub where I'll be able to play with this, without worrying about data loss for students. I'll continue tracking these and reporting as we gain more info from testing.

JohannesTheo commented 2 years ago

Hey @fperez, have you been able to gather some additional information on the topic? We encountered similar issues on 3.2.4 and will upgrade to 3.4.2 soon but for the same reasons you mentioned in #12154, we don't want our students to be the testers again 😅

Let us know if and what you have tried so far. I can offer to do additional testing based on your insights.

fperez commented 2 years ago

Hi @JohannesTheo - no, unfortunately I turned it off entirely. The two hubs (one for my class, one for my research team) where I have a fair amount of flexibility still need "real work" to get done on them, and data loss is absolutely not an option in either scenario. So with that being where the stakes are, I had to disable it completely there.

We do have a pure testing hub, but I've been super busy and haven't had the bandwidth to do extensive alpha testing there, sadly.