Open jeromegn opened 9 months ago
We decided that the appropriate fix here is to increment db_version
each time we see a new db_version
in the current transaction rather than only incrementing if the seen version is greater than the current version.
Todo:
ext_data
to keep track of db_versions
seen in the current commit to crsql_changes
crsql_next_db_version(x)
to bump the version if the provided version x
was not yet seenWe currently only bump versions iff:
crsql_next_db_version
x
is greater than the currently assigned next_db_version
Separately, we should be assigning to x + 1
rather than just x
if x
is greater than the currently assigned next_db_vesrion
There's at least one scenario where duplicate
seq
values may exist for the samedb_version
.Reproduction: