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

node: Wrap datastore with mutex to prevent data race #325

Merged
merged 2 commits into from
Jan 4, 2022

Conversation

Bidon15
Copy link
Member

@Bidon15 Bidon15 commented Jan 4, 2022

With current datastore, we bump into the race condition when the datastore is being both read and written to. Changing to mutex wrapped datastore has eliminated the data race error findings.

This case is heavily blocking proper initialisation of node and can cause flakiness in test execution.

Found during work on #262

Co-authored with @Wondertan

Co-authored-by: Wondertan <hlibwondertan@gmail.com>
@Bidon15 Bidon15 self-assigned this Jan 4, 2022
@Bidon15 Bidon15 changed the title node: update vanilla datastore with Mutex one node: Wrap datastore with mutex to prevent data race Jan 4, 2022
@Bidon15 Bidon15 merged commit 1449792 into celestiaorg:main Jan 4, 2022
@Bidon15 Bidon15 deleted the fix_ds branch January 4, 2022 18:02
Bidon15 added a commit to Bidon15/celestia-node that referenced this pull request Jan 11, 2022
* node: update vanilla datastore with Mutex one

Co-authored-by: Wondertan <hlibwondertan@gmail.com>

* update Changelog

Co-authored-by: Wondertan <hlibwondertan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants