Skip to content

Join retry logic ignores receiver_version and fails for VersionUnknown #16

@zxch3n

Description

@zxch3n

rust/loro-websocket-client/src/lib.rs:574-620, rust/loro-websocket-client/src/lib.rs:792-807

  • The plain join_loro path returns an error immediately if the server responds with
    JoinError::VersionUnknown, so clients never rewind.
  • The adaptor-based join loop does retry, but it discards the receiver_version field, never handing it to
    the adaptor or using it as the next attempt’s version.
  • Result: reconnects to a server that prunes history fail unless the server still has every update since the
    client’s last counter.
  • Fix: plumb receiver_version into retry logic (and surface it to get_alternative_version). Mirror that
    retry in the non-adaptor join_loro path so plain Loro docs also resync correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions