Skip to content

Figure out how to reset a YDoc instance without re-creating one #120

@dlqqq

Description

@dlqqq

Currently, the YRoom.restart() method added by #117 resets the YDoc by deleting the previous instance and creating a new pycrdt.Doc instance.

However, this breaks all existing references to the ydoc, e.g. ydoc = await room.get_ydoc(). Furthermore, all observers added to the previous instance will silently be dropped.

We likely need some upstream changes to pycrdt that allow pycrdt.BaseDoc and pycrdt.BaseType instances to be reset via some method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions