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

allow to gracefully exit from CL downloading stage #10887

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

awskii
Copy link
Member

@awskii awskii commented Jun 24, 2024

There is comment that preferred way to use different context not bounded to general app context. But through it we propagate cancellations by signal. @Giulio2002 could you please clarify if we still need separated context or it's okay to pass ctx.
Closes #10573

@Giulio2002
Copy link
Contributor

currentStage.ActionFunc(sctx, lg, cfg, args):

modify this line is clstages to use only ctx without context

@awskii
Copy link
Member Author

awskii commented Jun 25, 2024

Should ActionFunc cancel itself if ctx is done or would be better to still wait on ctx.Done in select there?

@AskAlexSharov
Copy link
Collaborator

FYI: there is context.AfterFunc method - maybe you can use it.

@Giulio2002 Giulio2002 enabled auto-merge (squash) June 27, 2024 12:39
@Giulio2002 Giulio2002 merged commit 10fabe4 into main Jun 27, 2024
10 checks passed
@Giulio2002 Giulio2002 deleted the caplin-download-interrupt branch June 27, 2024 12:39
@Giulio2002
Copy link
Contributor

this PR should work

@taratorio taratorio added this to the 2.60.3-fixes milestone Jun 28, 2024
awskii added a commit that referenced this pull request Jul 3, 2024
VBulikov pushed a commit that referenced this pull request Jul 4, 2024
There is comment that preferred way to use different context not bounded
to general app context. But through it we propagate cancellations by
signal. @Giulio2002 could you please clarify if we still need separated
context or it's okay to pass ctx.
VBulikov added a commit that referenced this pull request Jul 4, 2024
Duplicating #10887

Co-authored-by: awskii <awskii@users.noreply.github.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

erigon not shutting down properly during execution stage
5 participants