-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
9ff6db6
to
970e081
Compare
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this value?
There was a problem hiding this comment.
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
thank you @dignifiedquire :) |
Actually fixes the issue in ipfs/js-ipfs#469