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

Changes to fix #30 #50

Merged
merged 9 commits into from
Apr 4, 2025
Merged

Changes to fix #30 #50

merged 9 commits into from
Apr 4, 2025

Conversation

myzhang1029
Copy link
Owner

Backported to Penguin v0.5x from the development version.

(cherry picked from commit eb2a6fd)

@myzhang1029 myzhang1029 requested a review from Copilot April 4, 2025 03:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

src/mux/stream.rs:198

  • The poll_flush implementation immediately returns Ok(()) without flushing any buffered frames. Please confirm that bypassing flush here is intended and does not lead to potential inconsistencies in stream data delivery.
#[tracing::instrument(skip(_cx), level = "trace")]
    fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> {

src/mux/inner.rs:210

  • In the wind_down function, remaining frames are drained using try_recv and sent via ws.feed, but errors are only logged if sending fails. Consider adding more detailed logging or error handling to capture failures when draining remaining frames for improved diagnostics.
if should_drain_frame_rx {
            while let Ok(frame) = frame_rx.try_recv() {

src/client/mod.rs:267

  • [nitpick] The keepalive parameter has been changed from a u64 to OptionalDuration. Please ensure that all downstream components treat OptionalDuration correctly when converting to a concrete Duration value, to avoid unexpected behavior.
let mut backoff = Backoff::new(Duration::from_millis(200), Duration::from_millis(args.max_retry_interval), 2, args.max_retry_count);

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 88.15789% with 18 lines in your changes missing coverage. Please review.

Project coverage is 79.37%. Comparing base (9fe3c67) to head (bddb47e).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/mux/inner.rs 57.14% 6 Missing ⚠️
src/mux/stream.rs 0.00% 4 Missing ⚠️
src/arg.rs 33.33% 2 Missing ⚠️
src/client/maybe_retryable.rs 0.00% 2 Missing ⚠️
src/mux/lib.rs 0.00% 2 Missing ⚠️
src/mux/frame.rs 87.50% 1 Missing ⚠️
src/mux/timing.rs 99.03% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
+ Coverage   77.63%   79.37%   +1.74%     
==========================================
  Files          31       30       -1     
  Lines        5370     5160     -210     
==========================================
- Hits         4169     4096      -73     
+ Misses       1201     1064     -137     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

(cherry picked from commit eb2a6fd)

Signed-off-by: Zhang Maiyun <[email protected]>
@myzhang1029 myzhang1029 force-pushed the v6-backport-issue30 branch from 5298a55 to 1eef54e Compare April 4, 2025 04:18
@myzhang1029
Copy link
Owner Author

Confirmed with various iperf3 settings that this does fix #30.

@myzhang1029
Copy link
Owner Author

Rough testing seems to indicate that 3056b2c has no performance issue over TLS over an internet link
Before

[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][TX-C]   0.00-10.01  sec  30.4 MBytes  25.5 Mbits/sec                  sender
[  5][TX-C]   0.00-10.07  sec  27.9 MBytes  23.2 Mbits/sec                  receiver
[  7][RX-C]   0.00-10.01  sec  31.6 MBytes  26.5 Mbits/sec    1            sender
[  7][RX-C]   0.00-10.07  sec  27.2 MBytes  22.7 Mbits/sec                  receiver

[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][TX-C]   0.00-10.00  sec  30.1 MBytes  25.3 Mbits/sec                  sender
[  5][TX-C]   0.00-10.06  sec  27.9 MBytes  23.3 Mbits/sec                  receiver
[  7][RX-C]   0.00-10.00  sec  31.6 MBytes  26.5 Mbits/sec    1            sender
[  7][RX-C]   0.00-10.06  sec  27.5 MBytes  22.9 Mbits/sec                  receiver

After

[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][TX-C]   0.00-10.01  sec  34.5 MBytes  28.9 Mbits/sec                  sender
[  5][TX-C]   0.00-10.74  sec  31.9 MBytes  24.9 Mbits/sec                  receiver
[  7][RX-C]   0.00-10.01  sec  33.5 MBytes  28.1 Mbits/sec    1            sender
[  7][RX-C]   0.00-10.74  sec  28.5 MBytes  22.3 Mbits/sec                  receiver

[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][TX-C]   0.00-10.00  sec  33.9 MBytes  28.4 Mbits/sec                  sender
[  5][TX-C]   0.00-10.86  sec  31.9 MBytes  24.6 Mbits/sec                  receiver
[  7][RX-C]   0.00-10.00  sec  33.8 MBytes  28.3 Mbits/sec    1            sender
[  7][RX-C]   0.00-10.86  sec  28.2 MBytes  21.8 Mbits/sec                  receiver

Signed-off-by: Zhang Maiyun <[email protected]>
@myzhang1029 myzhang1029 requested a review from Copilot April 4, 2025 14:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/mux/stream.rs:158

  • The early return with a BrokenPipe error bypasses any flush or cleanup logic that might be necessary for pending writes. Please add a comment or consider whether the flush should occur before returning the error to ensure graceful shutdown.
if !self.can_write.load(Ordering::Relaxed) {

@myzhang1029 myzhang1029 merged commit ceffd45 into main Apr 4, 2025
43 of 44 checks passed
@myzhang1029 myzhang1029 deleted the v6-backport-issue30 branch April 4, 2025 14:34
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.

1 participant