-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
When using pycrdt-websocket 0.13.1, file access in jupyterlab can hang.
small.file.hangs.mp4
Error logs shows that when ystore.read() method is called before ystore db initialization finishes, it is waiting on an old Event created in __init__ method and ystore.start() method has assigned a new Event. And the old Event() is never set hence file access is blocked.
Error Logs:
[I 2024-05-02 11:10:30.558 ServerApp] Creating new notebook in /TestRTC2
[I 2024-05-02 11:10:30.988 ServerApp] Request for Y document 'TestRTC2/Untitled62.ipynb' with room ID: e6db9699-d261-481e-a188-d76652c290b8
[I 2024-05-02 11:10:31.329 YDocExtension] Creating FileLoader for: TestRTC2/Untitled62.ipynb
initialize ystore, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0>
[I 2024-05-02 11:10:31.332 YDocExtension] Watching file: TestRTC2/Untitled62.ipynb
[I 2024-05-02 11:10:31.337 ServerApp] Initializing room json:notebook:e6db9699-d261-481e-a188-d76652c290b8
read data, self.db_initializer=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0>
starting initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
ended initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
We can see that read data, self.db_initializer=<anyio._backends._asyncio.Event object at 0x7ff5a83355a0> is waiting on an old Event which is never set. Since after start method is called, self.db_initialized is replaced with a new Event.
starting initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
ended initialize db, self.db_initialized=<anyio._backends._asyncio.Event object at 0x7ff5a8335a80>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels