-
Notifications
You must be signed in to change notification settings - Fork 242
Move blob publish to broadcast batch dispatch, ensure public refs on inbound #596
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #596 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 306 306
Lines 18023 18017 -6
=========================================
- Hits 18023 18017 -6
Continue to review full report at Codecov.
|
| defer reader.Close() | ||
|
|
||
| // ... to the shared storage | ||
| d.Blob.Public, err = bm.sharedstorage.PublishData(ctx, reader) |
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.
This was the part where I got stuck before. How does this public ref 1) get stored in the database, and 2) not cause the data hash to change? Hasn't the batch been sealed and stored before we reach here?
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.
After refreshing myself on the other recent batching changes, it looks like the answer to (2) is that the hash calculation changed to not include the public ref as part of the hash. That's good.
Still can't figure out (1), ie where this data item is updated in the database with the public reference received here. It's definitely updated when it's received again in the event aggregator, but I'd expect it's updated prior to that as well... I'm likely just missing something.
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.
Great point. It's not currently at the point the batch is written to the comms layer. As you observe, it is when it comes back in the other end at the end of this PR - but I actually optimized that away in a later change.
I will add it back in, as it's only a performance hit for blobs. But if it's ok will do that as a separate PR.
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.
awrichar
left a comment
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.
Approved, but I left one big question above for the sake of my own understanding.
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
e22a27d to
57b3bde
Compare
Resolves #595
CRORequirePublicBlobRefswhen assembling the messages prior to dispatching a batch (timing issue with this seen in Blob retrieval issue in test with message cache hit #595)CRORequirePublicBlobRefswhen aggregating pins for broadcast messages