You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix progressive mode to use fetchSnapshot and atomic swap
8
+
9
+
Progressive mode was broken because `requestSnapshot()` injected snapshots into the stream in causally correct position, which didn't work properly with the `full` mode stream. This release fixes progressive mode by:
10
+
11
+
**Core Changes:**
12
+
- Use `fetchSnapshot()` during initial sync to fetch and apply snapshots immediately in sync transactions
13
+
- Buffer all stream messages during initial sync (renamed flag to `isBufferingInitialSync`)
14
+
- Perform atomic swap on first `up-to-date`: truncate snapshot data → apply buffered messages → mark ready
15
+
- Track txids/snapshots only after atomic swap (enables correct optimistic transaction confirmation)
16
+
17
+
**Test Infrastructure:**
18
+
- Added `ELECTRIC_TEST_HOOKS` symbol for test control (hidden from public API)
19
+
- Added `progressiveTestControl.releaseInitialSync()` to E2E test config for explicit transition control
20
+
- Created comprehensive progressive mode E2E test suite (8 tests):
21
+
- Explicit snapshot phase and atomic swap validation
22
+
- Txid tracking behavior (Electric-only)
23
+
- Multiple concurrent snapshots with deduplication
0 commit comments