Skip to content

Fix problem with fibers being cancelled due to timeout and causing fetch deadlock - #538

Merged
juanpedromoreno merged 3 commits into
xebia-functional:mainfrom
jordiolivares:bugfix/fix-deadlock
Sep 24, 2021
Merged

Fix problem with fibers being cancelled due to timeout and causing fetch deadlock#538
juanpedromoreno merged 3 commits into
xebia-functional:mainfrom
jordiolivares:bugfix/fix-deadlock

Conversation

@jordiolivares

Copy link
Copy Markdown
Contributor

Hi again, it seems that the process for batching across requests suffers from a deadlock issue.

In particular it can be triggered if the timeout occurs between the time the queue has been popped and the buffer is updated.

To fix this I just wrapped it in an F.uncancelable to fix the deadlock, safely updating the reference before cancellation is finished

@jordiolivares

Copy link
Copy Markdown
Contributor Author

Seems like the check is failing only due to the GithubExample test having bad credentials, as per the test error:

java.lang.Exception: Couldn't complete request, returned status: 401 Unauthorized: Body:
[info] {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}

@juanpedromoreno juanpedromoreno added the bug Something isn't working label Sep 24, 2021

@juanpedromoreno juanpedromoreno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks again @jordiolivares !

@juanpedromoreno
juanpedromoreno merged commit d56b9ba into xebia-functional:main Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants