Skip to content

Commit

Permalink
use db_version for col_version
Browse files Browse the repository at this point in the history
This ensures that if two fields should always change together that they always will as when one loses a merge the other one will also lose the merge.

Hmm, except in the case where the clocks are equal and then we tie break on value. Would be better to tie break on peer id for consistency.
  • Loading branch information
tantaman committed Nov 21, 2023
1 parent 66175b4 commit a286a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/rs/core/src/tableinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ impl TableInfo {
?,
0 WHERE true
ON CONFLICT DO UPDATE SET
col_version = col_version + 1,
col_version = crsql_next_db_version(),
db_version = ?,
seq = ?,
site_id = 0;",
Expand Down

0 comments on commit a286a3e

Please sign in to comment.