Skip to content

Extract ctid strategy#979

Draft
kvch wants to merge 2 commits into
mainfrom
pk-strategy-table-reader-refactoring
Draft

Extract ctid strategy#979
kvch wants to merge 2 commits into
mainfrom
pk-strategy-table-reader-refactoring

Conversation

@kvch

@kvch kvch commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Please provide a brief description of the changes in this PR.

Related Issue(s)
  • Fixes #(issue number)
  • Closes #(issue number)
  • Related to #(issue number)

Type of Change

Please select the relevant option(s):

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test coverage improvement
  • 🔨 Build/CI changes
  • 🧹 Code cleanup

Changes Made

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Code is well-commented
  • Documentation updated where necessary

Additional Notes

@kvch
kvch force-pushed the pk-strategy-table-reader-refactoring branch from eb1ddb3 to 4f453d8 Compare July 20, 2026 13:53
kvch added 2 commits July 20, 2026 15:54
- Collapse the progressTracking bool + progressBars map clump, which was
  duplicated across the generator and the reader, into a single
  progressTracker value with set/advance/complete methods. A zero-value
  tracker is disabled and no-ops, so callers no longer guard each call.
@kvch
kvch force-pushed the pk-strategy-table-reader-refactoring branch from 4f453d8 to 0cb8d34 Compare July 20, 2026 13:54
@github-actions

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data 77.04% (-0.10%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/ctid_table_reader.go 95.52% (+95.52%) 67 (+67) 64 (+64) 3 (+3) 🌟
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/instrumented_table_reader.go 0.00% (ø) 5 (+5) 0 5 (+5)
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/instrumented_table_snapshot_generator.go 0.00% (ø) 0 (-4) 0 0 (-4)
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/pg_snapshot_generator.go 75.59% (-7.66%) 127 (-82) 96 (-78) 31 (-4) 👎
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/progress_tracker.go 76.92% (+76.92%) 13 (+13) 10 (+10) 3 (+3) 🌟
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/snapshot_tx.go 100.00% (+100.00%) 13 (+13) 13 (+13) 0 🌟
github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/table_reader.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/xataio/pgstream/pkg/snapshot/generator/postgres/data/pg_snapshot_generator_test.go

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.

1 participant