-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sealing: DataCid on workers #8557
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8557 +/- ##
==========================================
- Coverage 40.86% 33.30% -7.56%
==========================================
Files 686 670 -16
Lines 75582 74780 -802
==========================================
- Hits 30883 24903 -5980
- Misses 39374 45021 +5647
+ Partials 5325 4856 -469
|
cid.Cid | ||
error | ||
}, 1) | ||
pbuf := <-throttle |
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 you get the buffer from the throttle channel at the top of this for loop? That way you could read directly into the buffer instead of reading to an intermediate buffer and copying
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.
We could, but reading before throttling should be (very slightly) faster / more efficient, as you're not waiting with some threads for the read to complete - the data already sits in a buffer
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.
That makes sense assuming that the io buffer is smaller than chunk.Unpadded(), which I think is correct 👍
1815108
to
779e923
Compare
So the itest with the bigger buffer is really flaky, with something weird in rpcenc happening:
Which is weird, because I don't think we've ever saw this in AddPiece (but we've also never tested it in itests with a worker + bigger bit of data); Something about how we handle responses in rpcenc is probably racy. |
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.
It seems like the rpcenc error is unrelated to this change, so I'm approving 👍
Seems like it's worth looking into the rpcenc error as a follow-up
Depends on filecoin-project/specs-storage#26
This PR adds a
ComputeDataCid
which will use add-piece workers to compute piece CIDs. This is mostly useful for scaling boost.Followups: