Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Fix state download race condition by creating a TaskQueue API #853

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Feb 13, 2019

PR description

This PR fixes an issue where the WorldStateDownloader could complete prematurely. Previously, there was a race condition where we could be checking to see if the queue is empty after the next round of tasks had been dequeued but before the corresponding requests had been sent and accounted for. To fix this issue, the queue api has been modified so that tasks must be marked as completed before they are completely forgotten. This also sets us up to safely resume an existing queue with a little bit more work.

@mbaxter mbaxter requested a review from ajsutton February 13, 2019 19:14
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@mbaxter mbaxter merged commit ac63edc into PegaSysEng:master Feb 14, 2019
rain-on pushed a commit to rain-on/pantheon that referenced this pull request Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants