refactor(sinktools): LazySinkSource cleanup waker handling, use StreamExt::split, improve unit tests, fix #2336#2556
Open
MingweiSamuel wants to merge 2 commits intomainfrom
Open
refactor(sinktools): LazySinkSource cleanup waker handling, use StreamExt::split, improve unit tests, fix #2336#2556MingweiSamuel wants to merge 2 commits intomainfrom
LazySinkSource cleanup waker handling, use StreamExt::split, improve unit tests, fix #2336#2556MingweiSamuel wants to merge 2 commits intomainfrom
Conversation
LazySinkSource cleanup waker handling, improve unit testsLazySinkSource cleanup waker handling, improve unit tests, fix #2336
LazySinkSource cleanup waker handling, improve unit tests, fix #2336LazySinkSource cleanup waker handling, use StreamExt::split, improve unit tests, fix #2336
Deploying hydro with
|
| Latest commit: |
68920b6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3c5a5e5d.hydroflow.pages.dev |
| Branch Preview URL: | https://lazy-1.hydroflow.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors sinktools’ LazySinkSource to simplify/optimize wakeup handling (addressing #2336) and modernize splitting by relying on StreamExt::split, alongside strengthening initialization-driving test coverage.
Changes:
- Replace the old multi-waker approach with a 2-slot
DualWakerbased onfutures_util::task::AtomicWaker. - Refactor
LazySinkSourceto hold state directly (removingRc<RefCell<...>>) and remove the custom split-half types in favor ofStreamExt::split. - Add/adjust unit tests for initialization behavior; update dev-deps to enable
tokio::time.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| sinktools/src/lazy_sink_source.rs | Refactors internal state + wakeup handling; switches to StreamExt::split; expands unit tests. |
| sinktools/Cargo.toml | Enables tokio’s time feature for dev-dependencies to support new tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b3c943d to
25cd484
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
sinktools/src/lazy_sink_source.rs:80
Futureis referenced in the trait bounds (Fut: Future<...>) but isn't imported in this module, which will fail to compile unless it happens to be in scope. Add an explicituse core::future::Future;(orstd::future::Future) near the top of the file.
impl<Fut, St, Si, Item, Error> Sink<Item> for LazySinkSource<Fut, St, Si, Item, Error>
where
Self: Unpin,
Fut: Future<Output = Result<(St, Si), Error>>,
St: Stream,
Si: Sink<Item>,
Error: From<Si::Error>,
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Docker tests pass locally |
ccc8f0e to
68920b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #2336
Adds a couple more simpler tests