Multi-tab Electric: a deleted row returns after a peer reset and deploys
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- 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 command in the issue. Trace how the peer reset, deploys, and reserved commit replay affect durable rows and both tabs; record the history in docs/contributing/oracle-coverage.md. Done means the replay passes after the fix, fails on the parent, and a hostile mutant fails.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
The multi-tab Electric oracle found a history where a deleted row returns. After every tab catches up, durable storage and both tabs still contain row 1. The model expects only row 2.
The failure reproduces on origin/main at 4c39add29 and on the head of #2262 (f276b4ad4). The oracle and the behavior it checks came in with #2265. #2262 does not cause it.
Law
A row that the server deletes stays deleted in durable storage and in every tab after all tabs catch up. A peer reset and a later deploy do not bring back a deleted row.
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.
{ seed: -1115798760, path: "1:4:3:3:3:3:3:3:3:3:3", endOnFailure: true }
Counterexample: [{"tabCount":2,"steps":[
{"kind":"server change","key":1,"pick":0},
{"kind":"advance","tab":1,"pick":0},
{"kind":"server change","key":1,"pick":0},
{"kind":"advance","tab":0,"pick":0},
{"kind":"peer reset"},
{"kind":"server change","key":1,"pick":0},
{"kind":"deploy"},
{"kind":"deploy"},
{"kind":"server change","key":1,"pick":0},
{"kind":"server change","key":1,"pick":0}]}]
Shrunk 10 time(s)
Observation after every tab caught up:
actual {"durableRows":[{"id":1,"label":"one"},{"id":2,"label":"two"}],
"tabs":[{"tab":"A","status":"ready","rows":[{"id":1,...},{"id":2,...}],"sourceError":true},
{"tab":"B","status":"ready","rows":[{"id":1,...},{"id":2,...}],"sourceError":true}]}
expected {"durableRows":[{"id":2,"label":"two"}],
"tabs":[{"tab":"A","status":"ready","rows":[{"id":2,...}],"sourceError":true},
{"tab":"B","status":"ready","rows":[{"id":2,...}],"sourceError":true}]}
The CI job that found it: Test (sqlite-adapters) on #2262, run 40723478437.
Replay
Run this in packages/browser-db-sqlite-persistence:
TANSTACK_DB_ORACLE_PROPERTY=browser.multi-tab-reserved-history \
TANSTACK_DB_ORACLE_SEED=-1115798760 \
TANSTACK_DB_ORACLE_PATH="1:4:3:3:3:3:3:3:3:3:3" \
npx vitest --run tests/multi-tab-electric-oracle.test.ts -t "generated multi-tab"
Related
- #2267 is a different symptom: a lagging resumed tab goes into error. This issue is a deleted row that returns.
- The fixed-seed campaign and the pinned storm histories pass. Only the random campaign reached this history.
Next steps
- Diagnose which step reintroduces row 1: the peer reset, the deploys, or the reserved-commit replay.
- 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
- 286
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 105
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
-
extractSimpleComparisons returns value: null when the right side of a comparison isn't a literalOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
`avg`, `min`, `max` and `sum` treat `null` values as `0`Evtl. vergeben @oyobbeb hat das vor 11 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
`Collection.currentStateAsChanges` JSDoc examples don’t match `CurrentStateAsChangesOptions`Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
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 23 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
fb55/htmlparser2#2579 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue needs-review
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Add Module DB RulesOffendocumentation public
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 68/100
midnightntwrk/umbradb#65 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
area/channels kind/bug priority/medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nanocoai/nanoclaw#4501 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs verification
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 13 Tagen