Skip to content

V2 metadata format. Bump version to 0.18 - #26

Draft
gorbak25 wants to merge 9 commits into
mainfrom
gorbak/new-clock-tables
Draft

V2 metadata format. Bump version to 0.18#26
gorbak25 wants to merge 9 commits into
mainfrom
gorbak/new-clock-tables

Conversation

@gorbak25

Copy link
Copy Markdown

No description provided.

@gorbak25
gorbak25 force-pushed the gorbak/new-clock-tables branch 8 times, most recently from 2e2097c to f518c86 Compare July 26, 2026 19:13
@gorbak25
gorbak25 force-pushed the gorbak/new-clock-tables branch 11 times, most recently from c0de1b2 to 2e0ab78 Compare August 5, 2026 14:55
- Add V2 schema: v2_pks, v2_clock, v2_tombstones, v2_tombstone_pks, v2_col_map tables
- Add on-demand V1-to-V2 hydration for rows not yet migrated
- Add V2 local write triggers (after_insert, after_delete, after_update)
- Add V2 merge path in changes_vtab_write (v2_merge_insert, v2_packed_merge)
- Add backfill_v2 for migrating existing V1 metadata to V2
- Add alter_v2 for schema migration support
- Add bootstrap_v2 for initial V2 table creation
- Add hash_pk for PK hashing in V2 format
- Add migrate.rs for V1-to-V2 migration orchestration
- Add teardown_v2 for V2 table cleanup
- Update config with metadata-write-version and metadata-use-version settings
- Add unconditional timestamp check in merge_insert
- Refactor v1_to_v2_hydrate_row to deduplicate clock copy logic
- Add v2_tests.rs: dual-write wire convergence, ts error handling, backfill tests
- Add v2_compat_tests.rs: V1/V2 compatibility and wire format sync tests
- Add rowid_check.rs: rowid key handling tests for V2
- Update sync helpers to use transactions with crsql_set_ts
- Update test_db_version.rs with crsql_set_ts after BEGIN blocks
- Add crsql_set_ts calls in C test sync helpers and transaction blocks
- Update ext-data with timestamp field for V2 metadata writes
- Update consts.h with V2 constants
- Wrap syncLeftToRight in BEGIN/COMMIT with crsql_set_ts
@gorbak25
gorbak25 force-pushed the gorbak/new-clock-tables branch 4 times, most recently from 49cafd7 to 3d56b6c Compare August 5, 2026 16:46
@gorbak25
gorbak25 force-pushed the gorbak/new-clock-tables branch from 3d56b6c to 4d06dea Compare August 5, 2026 16:48
- Unconditional timestamp checks in crsql_as_crr, crsql_begin_alter,
  crsql_commit_alter, and merge_insert
- Cross-platform unlink fix in v2_tests.rs
- Add crsql_set_ts() calls to Python integration tests
@gorbak25
gorbak25 force-pushed the gorbak/new-clock-tables branch 2 times, most recently from a64adaa to 22b1cb6 Compare August 5, 2026 21:34
@gorbak25

gorbak25 commented Aug 7, 2026

Copy link
Copy Markdown
Author

Closes superfly/corrosion#366

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants