Skip to content

fix(uring): review fixups for eclipse-zenoh/zenoh#2332#31

Merged
yellowhatter merged 4 commits into
io_uringfrom
PR-local/2332
Jun 23, 2026
Merged

fix(uring): review fixups for eclipse-zenoh/zenoh#2332#31
yellowhatter merged 4 commits into
io_uringfrom
PR-local/2332

Conversation

@YuanYuYuan

@YuanYuYuan YuanYuYuan commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Review fixups for eclipse-zenoh#2332 ("Support io_uring"), applied on top of the contributor's branch.

Key Changes

  • Remove leftover sleep(100ms) calls from z_ping warmup and measurement loops that corrupted the latency benchmark
  • Revert unrelated liveliness test changes (#[ignore] annotations and HashSet-based assertion relaxations) that were out of scope for an io_uring feature PR
  • Delete orphaned linux/memory/ directory (near-duplicate of linux/reader/, never compiled)
  • Degrade gracefully when io_uring reactor init fails: TransportManagerState::uring is now Option<Uring>; a mlock/io_uring failure logs a warning and falls back to the tokio RX path instead of failing manager construction
  • Enforce the link lease timeout on the uring RX task via TimeoutTracker; previously the uring path had a TODO and a dead peer would never be detected
  • Restrict get_fd() to Connected UDP only; unconnected sockets are shared across peers and cannot be demultiplexed by RecvMulti
  • Fix BatchHeader::new(h) used without transport_compression feature; replaced with the tuple constructor BatchHeader(h) which is always available
  • Strip commented-out dead code: thread-priority/realtime scheduling block, //ring.submit(), alternate enter() calls, commented writer field/ctor, log! macro in window.rs; fix "Urng" typo
  • Remove unused linux/writer/ and linux/api/writer/ modules (~200 LoC); the TX writer is not wired into the transport in this PR and should be a follow-up
  • Remove orphaned thread-priority dependency from zenoh-uring/Cargo.toml

Breaking Changes

None

- Remove debug sleep(100ms) from z_ping warmup and measurement loops
- Revert unrelated liveliness test weakening: restore order-specific
  assert_eq! checks, remove HashSet indirection, #[ignore] attrs,
  debug println!s, and commented-out code
- Delete orphaned linux/memory/ directory (never compiled, duplicate
  of reader/ left over from the split-into-files refactor)
- Degrade gracefully when io_uring reactor init fails (Option<Uring>
  in TransportManagerState, warn + fallback to tokio instead of error)
- Enforce lease timeout on the uring RX task via TimeoutTracker; reset
  on each received fragment, bail on expiry (was TODO/unimplemented)
- Restrict get_fd() to Connected UDP only; unconnected sockets are
  shared across peers and cannot be demuxed by io_uring RecvMulti
- Fix BatchHeader::new() called without transport_compression feature;
  use tuple constructor BatchHeader(h) which is always available
Strip the unused thread-priority/realtime scheduling block, commented
//ring.submit(), //let len, alternate enter() calls, and the no-op
//bail! match arms from api/reader/mod.rs. Remove the commented log!
macro from window.rs. Remove commented writer field and constructor
from uring.rs. Fix "Urng" typo in reactor thread log message.
The io_uring TX writer is not wired into the transport layer in this PR.
Remove linux/writer/ and linux/api/writer/ rather than shipping unused
public API. Remove thread-priority from Cargo.toml; its only consumer
was the commented-out realtime scheduling block already deleted.
@YuanYuYuan YuanYuYuan requested a review from yellowhatter June 16, 2026 07:29

@yellowhatter yellowhatter left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you!

@yellowhatter yellowhatter merged commit 4487490 into io_uring Jun 23, 2026
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