Closed SebastianStehle closed 11 months ago
Hi, @SebastianStehle!
LGTM.
@LSViana @SebastianStehle only older versions of Yjs use 31bit client IDs, all never ones use 53bit (numbers are related to safe integer representation of integer in JS).
Rolling back the PR changes based on the previous commit.
64 bit is definitely wrong, because it cannot be read in yjs depending on the value. therefore 32bit is safe for backwards compatibility and 53 bit should be preferred to reduce collisions.
Hi, @SebastianStehle!
If you'd like to provide another PR with the best fix for the future, please feel free to do that. I'm not sure we need to go back to 32-bit integers just for backward compatibility if we can make the code aligned with the latest version of Yjs.
yjs uses 32 bit client ids. If a client is exceeds the 32 range it cannot be decoded on the client anymore:
There is also an open discussion about that. https://github.com/y-crdt/y-crdt/issues/209