8000 Problem: Resume after interrupted clone always fails by arajkumar · Pull Request #698 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Problem: Resume after interrupted clone always fails #698

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

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

arajkumar
Copy link
Contributor
@arajkumar arajkumar commented Mar 8, 2024

We use done_time_epoch from timings to populate runState, which helps to skip already processed table sections.

However, we call summary_start_timing regardless of whether the section has been already done or not., which causing insertion(insert or replace) of default value to done_time_epoch because summary_start_timing won't be called for already done section.

Without this fix, while resuming after the interruption pgcopydb would do pre-data restore again leading to table already exists error.

Solution: Check whether the section is already completed using runState and exit early without calling summary_start_timing for already done section.

Related to #692

We always call `summary_start_timing` regardless of whether the section has been already done or not., which causing insertion(insert or replace) of default value to `done_time_epoch` because `summary_start_timing` won't be called for already done section.

Solution: Check whether the section is already completed using `runState` and exit early without calling `summary_start_timing` for already done section.

Related to dimitri#692

Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
@arajkumar arajkumar marked this pull request as draft March 10, 2024 06:37
@arajkumar arajkumar marked this pull request as ready for review March 10, 2024 06:37
"insert into summary(pid, tableoid, partnum, start_time_epoch, command)"
"insert or replace into summary(pid, tableoid, partnum, start_time_epoch, command)"
Copy link
Owner

Choose a reason for hiding this comment

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

I'm wondering if that could case issues wrt hiding errors.

@dimitri dimitri merged commit ff6b473 into dimitri:main Mar 11, 2024
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
0