Multi-tab Electric: a committed row disappears after tabs stop
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
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- sqlite, typescript
Rechercherichtung
Start with packages/browser-db-sqlite-persistence/tests/multi-tab-electric-oracle.test.ts and replay the supplied seed and path using the documented Vitest command. Trace the reserved commit through the second tab's catch-up, tab B's stop, and tab A's final catch-up to identify when row 1 disappears; record the trace in docs/contributing/oracle-coverage.md. Done means the replay passes after the fix, fails on the parent and a hostile mutant, and preserves the committed row in durable storage and both tabs.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
The multi-tab Electric oracle found a history where a durable row disappears. Two tabs share one persisted database. After a tab stops and the other tab catches up and stops, durable storage and both tabs lack row 1. The model expects row 1 with label v2.
The oracle and the behavior that it checks came in with #2265. The failure reproduces on main at 6bf0e86db. The random campaign draws a new seed for each run, so CI fails on this history only intermittently. #2263 passed CI because its run drew a different seed.
Law
A server change that a tab applied and committed stays in durable storage and in every tab after all tabs catch up. A tab stop does not remove committed rows.
Counterexample
Oracle: packages/browser-db-sqlite-persistence/tests/multi-tab-electric-oracle.test.ts, test keeps reserved commits lawful across generated multi-tab histories (random or replayed), property browser.multi-tab-reserved-history.
Counterexample: [{"tabCount":2,"steps":[
{"kind":"server change","key":1,"pick":0},
{"kind":"catch up","tab":0,"pick":0},
{"kind":"server change","key":1,"pick":0},
{"kind":"catch up","tab":0,"pick":0},
{"kind":"catch up","tab":1,"pick":1},
{"kind":"catch up","tab":0,"pick":0},
{"kind":"stop","tab":1,"pick":0},
{"kind":"catch up","tab":0,"pick":0},
{"kind":"stop","tab":0,"pick":0}]}]
Observation after every tab caught up:
actual {"durableRows":[{"id":2,"label":"two"}],
"tabs":[{"tab":"A","status":"ready","rows":[{"id":2,"label":"two"}]},
{"tab":"B","status":"ready","rows":[{"id":2,"label":"two"}]}]}
expected {"durableRows":[{"id":1,"label":"v2"},{"id":2,"label":"two"}],
"tabs":[{"tab":"A","status":"ready","rows":[{"id":1,"label":"v2"},{"id":2,"label":"two"}]},
{"tab":"B","status":"ready","rows":[{"id":1,"label":"v2"},{"id":2,"label":"two"}]}]}
Replay
Run this in packages/browser-db-sqlite-persistence:
TANSTACK_DB_ORACLE_PROPERTY=browser.multi-tab-reserved-history \
TANSTACK_DB_ORACLE_SEED=-1660880085 \
TANSTACK_DB_ORACLE_PATH="55:0:1:4:4:4:1:1:1:1:3:4:4:4:4" \
npx vitest run tests/multi-tab-electric-oracle.test.ts -t "random or replayed"
Related
- #2281 is a different symptom from the same oracle: a deleted row returns after a peer reset and deploys. This issue is a committed row that disappears after tab stops. The two can share a cause in reserved-commit replay, so diagnose them together.
- #2267 is a lagging resumed tab that goes into error.
Next steps
- Diagnose which step removes row 1: the second tab's catch-up with
pick: 1, the stop of tab B, or the last catch-up of tab A. - Record the trace in
docs/contributing/oracle-coverage.mdunder the multi-tab Electric owner until a fix lands. - Fix oracle-first: keep this history as a replay, show RED on the parent, GREEN after the fix, and a hostile mutant that fails.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4k
- Forks
- 277
- Ø Merge
- 1 T. 7 Std.
- Gemergte PRs (30 T.)
- 172
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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 TanStack/db
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
OfflineExecutor.dispose() never settles pendingTransactionPromisesEvtl. wieder frei @Claire-ovo hat das vor 7 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TanStack/db#2254 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Two @tanstack/db tests time out under CPU load because a cold module import counts against the 5 s default timeoutEvtl. vergeben @jp-knj hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
setWindow publishes the new page before its include demand settles (on-demand materialize / toArray)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
remotion-dev/remotion#12905 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
supermomonga/paseo-plugin-zcode-provider#83 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
oxidecomputer/skepsis#102 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
voidzero-dev/void#677 ·
Maintainer antworten meist innerhalb von 1 Tag