Skip to content

Documents: a duplicate's write leaves the host replica on an unrecorded Yjs clientID #794

Open

Description

@SSFSKIM

Problem

When the document store writes a duplicate, the duplicating actor's host replica is left on a fresh random Yjs clientID. So hostClients doesn't record the id the replica is bound to, and the document's state vector gains one extra clientID for every duplicate. writeCopy throws its doc away, so that path is harmless; the duplicate path is not.

Work

  • Red first: duplicate a document and check that the host replica's clientID is in hostClients and that the state vector has not grown by an unbound id.
  • Fix the duplicate's load-and-hook write so that the replica keeps the bound clientID, or so that the new id is recorded.

Context

Found by batch 7 group D while building #612 (the Yjs client-id log line). It predates batch 7.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions