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
{{ message }}
Repository navigation
Commit 31c558e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(replay): Preserve segment ID after buffer-to-session conversion (#5753)
* fix(replay): Preserve segment ID after buffer-to-session conversion
After a buffer-to-session conversion, the replay type stays BUFFER
but the segment counter reflects the real sequence. If the app
crashes and finalizePreviousReplay recovers the last segment,
fromDisk() was normalizing the segment ID to 0 for all BUFFER
replays, creating a duplicate segment 0 that overwrites the original.
Add a persisted isFlushed flag set when the buffer is successfully
flushed. fromDisk() now only normalizes to 0 when the buffer was
never flushed (no segments were ever sent to the server).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* changelog
* Apply suggestion from @romtsn
* Add comment explaining isFlushed flag purpose
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(replay): Use persisted timestamp for flushed buffer recovery
After buffer-to-session conversion, use the persisted segmentTimestamp
(which chains with previous segments) instead of the first frame
timestamp, avoiding gaps in the recovered segment timeline.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Revert timestamp normalization change
The gap from using first-frame timestamp vs persisted segmentTimestamp
is at most ~1s (1/frameRate) — negligible for crash recovery.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments