electric-sql / electric-sql/electric

Deriving the offset from the LSN in SSE mode is using a backend implementation detail that could change

Open
#2,870 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
375
Avg merge
3d 1h
Merged PRs (30d)
18

Description

See: https://github.com/electric-sql/electric/pull/2869#pullrequestreview-2982441030

> I don't like the existing getOffset method that constructs one from the LSN and a _0 suffix. The offset being constructed from an LSN is a backend implementation detail we should not depend on. I think we had this in my original POC as a work around, but we really should replace this by adding the actual offset on the up-to-date message, at least in SSE mode.

I would advocate for adding the actual offset to all `up-to-date` messages, on both SSE and long polling mode, it seems like a sensible place to place it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.