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

Add resume from checksum #344

Merged
merged 3 commits into from
Sep 4, 2024
Merged

Add resume from checksum #344

merged 3 commits into from
Sep 4, 2024

Conversation

morgo
Copy link
Collaborator

@morgo morgo commented Sep 2, 2024

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.
Further notes in https://github.com/cashapp/spirit/blob/main/.github/CONTRIBUTING.md

This fixes #317

In our case we support yield via automation (pod cycling every 24hrs), so I am going to call this fixed.. even though it only completes part of the described FR.

Also fixes #320 and fixes #315 - the root cause is depending when the context cancel is detected, the error message can vary.

@morgo morgo marked this pull request as ready for review September 2, 2024 16:21
@morgo morgo force-pushed the mtocker-resume-checksum branch 2 times, most recently from 5ba57eb to 846175f Compare September 2, 2024 16:34
if r.dbConfig == nil {
r.dbConfig = dbconn.NewDBConfig()
}
r.db.SetMaxOpenConns(r.dbConfig.MaxOpenConnections + 2)
var err error
for i := range 3 { // try the checksum up to 3 times.
if i > 0 {
r.checksumWatermark = "" // reset the watermark if we are retrying.
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this intentional? so resume from checksum watermark only works if first resume is successful, otherwise it starts checksum from scratch again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes that's right. If there is any failure we recheck everything.

@morgo morgo enabled auto-merge September 4, 2024 14:08
@morgo morgo merged commit 5a7c164 into main Sep 4, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants