Skip to content

[FIX] Buffer realtime ops arriving before asset registration#2007

Merged
kpal81xd merged 2 commits intomainfrom
fix/buffer-realtime-ops-for-unregistered-assets
Apr 14, 2026
Merged

[FIX] Buffer realtime ops arriving before asset registration#2007
kpal81xd merged 2 commits intomainfrom
fix/buffer-realtime-ops-for-unregistered-assets

Conversation

@kpal81xd
Copy link
Copy Markdown
Contributor

PLAY-CANVAS-G2XR — 135 events in release:2.20.*

What's Changed

  • During bulk asset loading (loadAllAndSubscribe), ShareDB ops can arrive for assets that haven't been added to the editor registry yet. The realtime:op:assets handler calls assets:getUnique which returns null, silently dropping the op and leaving local editor state stale for collaborative sessions.
  • Buffer incoming ops for unregistered assets in a Map, replay them once the asset is added and its ObserverSync is initialized, and clear the buffer on disconnect/reconnect.
  • Applied to both editor (src/editor/assets/assets-sync.ts) and launch (src/launch/assets/assets-sync.ts) variants.

Checks

During bulk asset loading, ShareDB ops can arrive for assets that
haven't been added to the editor registry yet. Buffer these ops and
replay them once the asset is registered, preventing silent data loss
in collaborative editing sessions.
@kpal81xd kpal81xd self-assigned this Apr 14, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
editor Ready Ready Preview, Comment Apr 14, 2026 2:20pm

Request Review

@kpal81xd kpal81xd merged commit f1662fb into main Apr 14, 2026
7 checks passed
@kpal81xd kpal81xd deleted the fix/buffer-realtime-ops-for-unregistered-assets branch April 14, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant