electric icon indicating copy to clipboard operation
electric copied to clipboard

Sync Service breaks on upgrade if format of the storage changes

Open robacourt opened this issue 1 year ago • 1 comments

For example electric-sql/electric-next#182 changed the CubDB storage format (by reordering the terms in the tuple)

So if you synced a shape with a previous version then upgraded to that version, if you try to sync the shape again you get a 500 due to the service trying to read the old format but thinking it's the new format.

Perhaps the files should be versioned and wiped if the version changes.

robacourt avatar Jul 31 '24 10:07 robacourt

Or we need to define a forward-compatible format for shape storage.

alco avatar Jul 31 '24 10:07 alco

Fixed in #1517, version changes will now wipe the shapes. Perhaps in the future we could upgrade the data as @alco suggested as an optimisation, but we are already safe.

robacourt avatar Aug 28 '24 12:08 robacourt