Skip to content

If there are errors during importing, it should not panic, and the imported changes should be removed from the oplog #793

@zxch3n

Description

@zxch3n

If the same OpId appears with different operations, it may cause errors when applying the op due to unmet preconditions—for example, the target container ID does not exist, or the insertion position exceeds the list length. Currently, when such cases occur, the import process panics directly, leaving the LoroDoc in an unrecoverable state. A better API design would return an error without affecting the current oplog or doc state. In the current architecture, this requires us to implement an internal “oplog rollback.”

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions