-
-
Notifications
You must be signed in to change notification settings - Fork 57
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 arc for broadcast channels #1216
use arc for broadcast channels #1216
Conversation
Important Auto Review SkippedDraft detected. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe update involves wrapping the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- crates/ott-balancer/src/monolith.rs (2 hunks)
Additional comments: 1
crates/ott-balancer/src/monolith.rs (1)
- 149-155: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [152-162]
The use of
Arc
to wrap thebroadcast_tx
sender in theRoom
struct is consistent with the PR's objective to optimize memory usage by allowing shared ownership of the broadcast sender. This change should reduce the number of clones created when broadcasting messages to multiple clients.However, ensure that all parts of the code that interact with
broadcast_tx
are updated to work with theArc
wrapped type. This includes any external modules or tests that may rely on the previous type signature.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1216 +/- ##
================================================
+ Coverage 61.5318% 61.6880% +0.1561%
================================================
Files 115 115
Lines 9322 9360 +38
Branches 1141 1142 +1
================================================
+ Hits 5736 5774 +38
Misses 3586 3586 ☔ View full report in Codecov by Sentry. |
Do you know why the cypress tests fail? I took a look at the logs and it seems like they are failing to fetch the imported modules for the component tests, and it can't find a |
Also, do you know if it would it be better to use Does one use more memory as opposed to the other? |
It's completely out of our control, and its really annoying. See cypress-io/cypress#25913 |
I took a look at it, and the problem is that the Stream wants owned values because it has to queue them internally before they get flushed to IO. I don't think this is feasible for us right now, so we can drop this task. Sorry about that. |
No problem. Do you think you could elaborate a little on what you mean just for my own understanding? From what I understand stream can't take a reference to a variable. It must have ownership of Thanks. |
We get |
closes #1199
Summary by CodeRabbit