electric
electric copied to clipboard
Remove snapshots and unify them with shape log instead
Currently, Electric stores an initial snapshot and a shape log for every shape. However, the snapshot is a sequence of inserts and thus can be stored in the shape log, no need for a separate snapshot.
For example, assume the following initial snapshot:
[ {op: "insert", row: <row1>}, ..., {op: "insert", row: <row g>} ]
And shape log:
[ {op: "insert", row: <row h>}, ..., {op: "insert", row: <row j>} ]
We can remove the snapshot and unify it with the shape log:
[ {op: "insert", row: <row1>}, ..., {op: "insert", row: <row g>}, {op: "insert", row: <row h>}, ..., {op: "insert", row: <row j>} ]