[BUG] Realtime confirms a block or variable edit before it is stored, so a failed write loses it
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- backend, distributed-systems
Rechercherichtung
Start with apps/realtime/src/handlers/subblocks.ts and variables.ts, tracing how a flush handles pending edits, confirmations, failures, and actor IDs. Reproduce the overlap with two tabs and a failed write, then check that each edit settles only after its own write and collaborators see the stored value with the correct audit actor.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
When an edit to a subblock or variable field arrives while the previous edit of that field is being written, it joins that write's operation list. The earlier write confirms it before its value is stored. If its own write then fails, the client has already dropped the operation and ignores the failure, so the edit is lost while the UI still shows it. In the same overlap the first editor can be left showing a stale value, a later edit can be dropped without an answer, and the variable audit log can name the wrong user.
To Reproduce
- Open the same workflow in two tabs or as two users on the same realtime pod.
- Edit the same field in both, with B's edit arriving while A's write is in progress (a slow database widens the window).
- Make B's write fail, for example by locking the block.
- B sees the edit as saved, but it is not stored.
Expected behavior
Each edit is confirmed or failed only after its own write settles, every collaborator ends with the stored value, no edit is silently dropped, and the audit actor is the user who made the change.
Additional context
apps/realtime/src/handlers/subblocks.ts and variables.ts: a flush reads pending.latest when it starts but reads opToSocket and actorId at the end, and deletes the map entry after a newer edit may be using it.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 29.8k
- Forks
- 3.9k
- Ø Merge
- 1 Std. 43 Min.
- Gemergte PRs (30 T.)
- 937
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus simstudioai/sim
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
simstudioai/sim#10710 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
simstudioai/sim#10708 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
simstudioai/sim#10706 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
simstudioai/sim#10704 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
simstudioai/sim#10702 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in simstudioai/sim
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
melgarafael/DeskcommCRM#5614 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
slackapi/slack-health-score#253 ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature needs triage site
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
owid/owid-grapher#8019 ·
Maintainer antworten meist innerhalb von 1 Tag
-
via-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
callstackincubator/simlock#2088 ·
Maintainer antworten meist innerhalb von 1 Tag