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

Reset LastSuccessfulVersion to 0 if Restarting on Stauts=Complete #571

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

dermanyang
Copy link
Contributor

@dermanyang dermanyang commented Oct 28, 2024

Purpose

If the backfillStatus is Complete on a particular row, while the processor will correctly start to backfill from 0 again, the table will not reflect the current status due to the monotonic increasing invariant set on the table writes. A workaround was to simply remove that invariant.

This PR adds back that invariant to avoid possible edge cases and instead resets the latestSuccessVersion to 0 in the starting_version logic upon encountering the Complete state.

Testing

Manually tested expected behavior:
image

image

image

@dermanyang dermanyang requested a review from a team October 28, 2024 22:47
@dermanyang dermanyang marked this pull request as ready for review October 28, 2024 22:47
@yuunlimm
Copy link
Contributor

qq: what specific edge cases led to the removal of the invariant initially?

@dermanyang
Copy link
Contributor Author

@yuunlimm I initially removed the WHERE clause assuming that given correct processing order and starting_version logic (namely, choosing the MAX of start_ver/latest_processing or restarting given a Completed state) would be sufficient.

But I remembered that we don't actually enforce in-order events so it would be possible to have weird in_progress states that don't actually reflect the processor's progress lol. So I added it back for sanity.

@dermanyang dermanyang merged commit 9ac7d51 into main Oct 29, 2024
7 checks passed
@dermanyang dermanyang deleted the sdy/add_monotonic branch October 29, 2024 23:14
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.

3 participants