Join retry logic ignores receiver_version and fails for VersionUnknown

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
networking

Research direction

Start in rust/loro-websocket-client/src/lib.rs at lines 574-620 and 792-807, comparing the plain join_loro path with the adaptor-based join loop. Trace receiver_version through retry handling and get_alternative_version. Done means both paths retry VersionUnknown responses and use the receiver_version for resynchronization.

Written by the indexing model from the issue text.

Description

bug

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.
Dominant language
TypeScript
Stars
38
Forks
11
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from loro-dev/protocol

All issues in loro-dev/protocol

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.