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: check for deal existance before processing #1557

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

nikonov1101
Copy link
Member

We can get a race when waitForDeal's timer ticks after the waitForExternalUpdates's one.
Deal will be traited as externally opened and its processing will be started. Then waitForDeal will make a tick, detected new deal opened for known order and add the same deal to the processing. This commit adds check that deal is not in the state storage before starting the processing routine.

@nikonov1101 nikonov1101 added 💩 T: bug This PR/Issue fixes a bug P: HIGH This PR/Issue has the high priority V: patch This PR/Issue requires patch version to be bumped S: Connor This PR/Issue changes Connor labels Sep 26, 2018
Copy link
Collaborator

@antmat antmat left a comment

Choose a reason for hiding this comment

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

this still has a race

ALex Nikonov added 2 commits October 2, 2018 15:30
We can get a race when `waitForDeal`'s timer ticks after the `waitForExternalUpdates`'s one.
Deal will be traited as externally opened and its processing will be started. Then waitForDeal will make a tick, detected new deal opened for known order and add the same deal to the processing. This commit adds check that deal is not in the state storage before starting the processing routine.
@nikonov1101 nikonov1101 force-pushed the fix/connor/proper-deal-restore branch from ba76bf2 to 69d9807 Compare October 2, 2018 14:58
@antmat antmat merged commit a2860fd into master Oct 2, 2018
@antmat antmat deleted the fix/connor/proper-deal-restore branch October 2, 2018 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: HIGH This PR/Issue has the high priority S: Connor This PR/Issue changes Connor 💩 T: bug This PR/Issue fixes a bug V: patch This PR/Issue requires patch version to be bumped
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants