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

Fix cancelling task leading to an error #4195

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

DelSkayn
Copy link
Member

@DelSkayn DelSkayn commented Jun 14, 2024

Thank you for submitting this pull request! We really appreciate you spending the time to work on these changes.

What is the motivation?

Cancellation of task upon shutdown could lead to errors being reported.
These tasks can be cancelled without problem and so the error resulting from its cancellation should be ignored.

What does this change do?

Ignores cancellation errors.

What is your testing strategy?

This error happens quite infrequently as it seems the shutdown needs to happen while the task is actively doing work for it to return an error. We don't have a good way to consistently replicate the behaviour so I have opted to leave the change untested as the extra error being returned is a relatively minor issue.

Whoever with an informal test of running the reproduction code provided in the linked issue numerous times with this fix I was no longer able to get the same issue to appear.

Is this related to any issues?

Fixes #4140

Does this change need documentation?

  • No documentation needed

Have you read the Contributing Guidelines?

@DelSkayn DelSkayn marked this pull request as ready for review June 14, 2024 12:57
@DelSkayn DelSkayn requested review from tobiemh and a team as code owners June 14, 2024 12:57
Copy link
Contributor

@emmanuel-keller emmanuel-keller left a comment

Choose a reason for hiding this comment

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

LGTM!

@emmanuel-keller emmanuel-keller added the awaiting backport Merged PRs waiting to be backported label Jun 18, 2024
@rushmorem rushmorem added this pull request to the merge queue Jun 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 18, 2024
@rushmorem rushmorem added this pull request to the merge queue Jun 18, 2024
Merged via the queue into surrealdb:main with commit befb185 Jun 18, 2024
24 checks passed
@winksaville
Copy link

Great to hear, was it easily reproducible?

@rushmorem rushmorem added this to the v2.0.0-alpha.2 milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting backport Merged PRs waiting to be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: kv-mem fails sometimes
5 participants