Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New snapshot iterator and position format #132

Merged
merged 21 commits into from
Apr 18, 2024
Merged

Conversation

lyuboxa
Copy link
Contributor

@lyuboxa lyuboxa commented Apr 16, 2024

Description

The iterator supports snapshots based on range and is limited to tables which have an ordinal number (integer) as primary key. If these conditions are not met, validation will fail.

Support for multiple tables is builtin. Each table gets a dedicated worker. Positional data keeps track of the progress of all tables, not just the one which the record is related to.

Resuming a snapshot is supported, if the snapshot positional data requires it.

This work is not integrated into the CDC or LongPoll iterator and the new position type is not compatible. This will work will follow.

Fixes # (issue)

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

The iterator supports snapshots based on range and is limited to tables
which have an ordinal number (integer) as primary key. If these conditions are
not met, validation will fail.

Support for multiple tables is builtin. Each table gets a dedicated worker.
Positional data keeps track of the progress of all tables, not just the one which the record
is related to.

Resuming a snapshot is supported, if the snapshot positional data requires it.

This work is not integrated into the CDC or LongPoll iterator and the new position type
is not compatible. This will work will follow.
@raulb raulb mentioned this pull request Apr 16, 2024
7 tasks
@lyuboxa lyuboxa marked this pull request as ready for review April 17, 2024 02:13
@lyuboxa lyuboxa requested a review from a team as a code owner April 17, 2024 02:13
source/position/position.go Show resolved Hide resolved
source/position/position.go Outdated Show resolved Hide resolved
source/snapshot/fetcher.go Outdated Show resolved Hide resolved
source/snapshot/fetcher.go Outdated Show resolved Hide resolved
source/snapshot/fetcher.go Outdated Show resolved Hide resolved
source/snapshot/iterator.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
source/position/position_test.go Outdated Show resolved Hide resolved
source/snapshot/iterator.go Outdated Show resolved Hide resolved
source/snapshot/iterator.go Outdated Show resolved Hide resolved
source/snapshot/iterator.go Outdated Show resolved Hide resolved
source/snapshot/fetch_worker.go Outdated Show resolved Hide resolved
source/snapshot/fetch_worker.go Outdated Show resolved Hide resolved
source/snapshot/fetch_worker.go Show resolved Hide resolved
source/snapshot/fetch_worker.go Outdated Show resolved Hide resolved
source/snapshot/fetch_worker.go Outdated Show resolved Hide resolved
source/snapshot/fetch_worker.go Outdated Show resolved Hide resolved
@lyuboxa
Copy link
Contributor Author

lyuboxa commented Apr 17, 2024

@lovromazgon addressed (I think) most of your comments here 2d60841

Copy link
Contributor

@hariso hariso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I guess the docs (README) will be updated once the changes have been integrated?

@lovromazgon
Copy link
Member

@hariso yeah I think we can postpone that, since these changes don't have any effect yet.

@lovromazgon lovromazgon merged commit 8062fb6 into main Apr 18, 2024
3 checks passed
@lovromazgon lovromazgon deleted the lk/snapshot+position branch April 18, 2024 16:16
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.

4 participants