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(blockstore: lock getStream to avoid race issues #85

Merged
merged 1 commit into from
Sep 12, 2016
Merged

Conversation

dignifiedquire
Copy link
Member

Actually fixes the issue in ipfs/js-ipfs#469

@@ -109,7 +109,7 @@ module.exports = (repo) => {

it('massive read', (done) => {
parallel(_.range(20 * 100).map((i) => (cb) => {
const j = i % 20
const j = i % 50
Copy link
Member

Choose a reason for hiding this comment

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

Can we put this magic number in a variable that explains what it means?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -109,7 +109,7 @@ module.exports = (repo) => {

it('massive read', (done) => {
parallel(_.range(20 * 100).map((i) => (cb) => {
const j = i % 20
const j = i % blockCollection.length
Copy link
Member

Choose a reason for hiding this comment

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

What's this value?

Copy link
Member Author

Choose a reason for hiding this comment

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

What value? This is iterating over the earlier put blockCollection doing parallel reads

@daviddias
Copy link
Member

thank you @dignifiedquire :)

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