You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: separate read state from effective state in Transaction
Split the Transaction struct's read_snapshot field into two concerns:
- read_snapshot: Option<SnapshotRef> (None for CREATE TABLE)
- effective_table_config: TableConfiguration (always the config this commit produces)
- should_emit_protocol/should_emit_metadata flags for P&M action emission
This cleanly separates "what version did I read?" (for conflict detection,
post-commit snapshots, ICT monotonicity) from "what schema/protocol/metadata
will this commit produce?" (for write context, stats, feature checks).
Key changes:
- 17 write-path call sites migrated to effective_table_config
- 9 read-path call sites use read_snapshot() helper
- Protocol/Metadata emission is now flag-based instead of is_create_table()
- CREATE TABLE no longer creates a synthetic pre-commit snapshot
- LogSegment::new_for_version_zero replaces LogSegment::for_pre_commit
- TableConfiguration::new_post_commit now accepts optional new P&M
- CRC delta uses emit flags instead of is_create check
This is a pure refactor with no behavior change. All existing tests pass.
0 commit comments