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

Use BytesStream inside Transport trait #1001

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

akoshelev
Copy link
Collaborator

This change is to unify stream handling between in-memory and real-world implementations. Before, in memory streams yielded Vec<u8> and HTTP streams operated on Result<Bytes, _>.

This discrepancy required us to build a compatibility layer, and it makes sense now to unify both implementations.

The main motivator for this change is to be able to use RecordsStream inside shard receivers - UnorderedReceiver use case fits MPC model well, but is clunky to use inside shard channels - we always receive items in a pure streaming fashion instead.

This change is to unify stream handling between in-memory and real-world implementations. Before, in memory streams yielded `Vec<u8>` and HTTP streams operated on `Result<Bytes, _>`.

This discrepancy required us to build a compatibility layer, and it makes sense now to unify both implementations.

The main motivator for this change is to be able to use `RecordsStream` inside shard receivers - `UnorderedReceiver` use case fits MPC model well, but is clunky to use inside shard channels.
@akoshelev akoshelev requested a review from andyleiserson April 5, 2024 06:09
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.59%. Comparing base (90b3d98) to head (5f3967d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
- Coverage   90.64%   90.59%   -0.05%     
==========================================
  Files         167      167              
  Lines       23541    23548       +7     
==========================================
- Hits        21338    21334       -4     
- Misses       2203     2214      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akoshelev akoshelev merged commit b651100 into private-attribution:main Apr 5, 2024
11 checks passed
@akoshelev akoshelev deleted the shard-gateway-reqs branch April 5, 2024 20:52
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.

2 participants