Skip to content

Ensure daemon fallback obeys disable overrides#1876

Merged
oferchen merged 1 commit into
masterfrom
fix-fallback-binary-test-failure
Nov 1, 2025
Merged

Ensure daemon fallback obeys disable overrides#1876
oferchen merged 1 commit into
masterfrom
fix-fallback-binary-test-failure

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 1, 2025

Summary

  • short-circuit daemon fallback delegation when either override environment disables it, ensuring disable flags take effect before probing binaries

Testing

  • cargo test -p rsync-daemon --lib

https://chatgpt.com/codex/tasks/task_e_69060339d12883239a6de73da42a4b1a

@oferchen oferchen merged commit e5f4834 into master Nov 1, 2025
@oferchen oferchen deleted the fix-fallback-binary-test-failure branch November 1, 2025 13:07
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/daemon/src/cli.rs
Comment on lines 105 to 112
pub(super) fn fallback_binary_configured() -> bool {
if override_disables_fallback(DAEMON_FALLBACK_ENV)
|| override_disables_fallback(CLIENT_FALLBACK_ENV)
{
return false;
}

configured_fallback_binary()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Respect daemon override precedence when client fallback is disabled

The new early return in fallback_binary_configured now disables delegation whenever CLIENT_FALLBACK_ENV is set to a disabling value, even if DAEMON_FALLBACK_ENV explicitly selects a fallback binary. configured_fallback_binary intentionally gives daemon overrides higher precedence than the client environment, so with both variables set (OC_RSYNC_DAEMON_FALLBACK=default and OC_RSYNC_CLIENT_FALLBACK=off), prior behaviour delegated to the selected binary, while the new logic returns false and skips delegation entirely. This regression prevents operators from disabling client fallback globally while still enabling daemon fallback via the daemon-specific override.

Useful? React with 👍 / 👎.

oferchen added a commit that referenced this pull request May 7, 2026
Specifies graduating the io_uring socket writer from IORING_OP_SEND to
IORING_OP_SEND_ZC on kernel >= 6.0: two-CQE completion model,
pin-counted buffer pool for the user-page lifetime contract, kernel
probe via IORING_REGISTER_PROBE with fallback, daemon TCP integration
(#1876), and the throughput vs latency trade-off with the 16 KiB
threshold rule.
oferchen added a commit that referenced this pull request May 7, 2026
Plan replaces std and tokio TcpStream halves in the daemon accept
loop with the io_uring socket reader/writer adapters once the shared
session ring (#1874) and per-session ring pool (#1936/#1937) land,
reusing the POLLOUT linked-timeout fix from #1872.
oferchen added a commit that referenced this pull request May 17, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 17, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 17, 2026
… (#4285)

Audits whether prerequisites for #1876 have landed and proposes
splitting the work into reviewable subtasks (#1876-a through e).

- #1874 (shared ring + POLL_ADD) shipped via PR #3553.
- #1937 (session ring pool) shipped via PR #4275.
- #1935 (hybrid tokio listener) shipped via PR #4278.
- No io_uring task carries id #1875; the original dependency note
  most plausibly meant the session-pool and listener work above.

Missing surface enumerated: pooled-ring constructors on the socket
adapters, daemon plumbing for SessionRingPool, sync and async worker
swaps, IORING_OP_LINK_TIMEOUT integration, and async-cancel
discipline. Trigger conditions (kernel >= 5.6, io_uring feature,
opt-in flag) and a five-step implementation plan included.
oferchen added a commit that referenced this pull request May 18, 2026
Specifies graduating the io_uring socket writer from IORING_OP_SEND to
IORING_OP_SEND_ZC on kernel >= 6.0: two-CQE completion model,
pin-counted buffer pool for the user-page lifetime contract, kernel
probe via IORING_REGISTER_PROBE with fallback, daemon TCP integration
(#1876), and the throughput vs latency trade-off with the 16 KiB
threshold rule.
oferchen added a commit that referenced this pull request May 18, 2026
Plan replaces std and tokio TcpStream halves in the daemon accept
loop with the io_uring socket reader/writer adapters once the shared
session ring (#1874) and per-session ring pool (#1936/#1937) land,
reusing the POLLOUT linked-timeout fix from #1872.
oferchen added a commit that referenced this pull request May 18, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
… (#4285)

Audits whether prerequisites for #1876 have landed and proposes
splitting the work into reviewable subtasks (#1876-a through e).

- #1874 (shared ring + POLL_ADD) shipped via PR #3553.
- #1937 (session ring pool) shipped via PR #4275.
- #1935 (hybrid tokio listener) shipped via PR #4278.
- No io_uring task carries id #1875; the original dependency note
  most plausibly meant the session-pool and listener work above.

Missing surface enumerated: pooled-ring constructors on the socket
adapters, daemon plumbing for SessionRingPool, sync and async worker
swaps, IORING_OP_LINK_TIMEOUT integration, and async-cancel
discipline. Trigger conditions (kernel >= 5.6, io_uring feature,
opt-in flag) and a five-step implementation plan included.
oferchen added a commit that referenced this pull request May 18, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
… (#4285)

Audits whether prerequisites for #1876 have landed and proposes
splitting the work into reviewable subtasks (#1876-a through e).

- #1874 (shared ring + POLL_ADD) shipped via PR #3553.
- #1937 (session ring pool) shipped via PR #4275.
- #1935 (hybrid tokio listener) shipped via PR #4278.
- No io_uring task carries id #1875; the original dependency note
  most plausibly meant the session-pool and listener work above.

Missing surface enumerated: pooled-ring constructors on the socket
adapters, daemon plumbing for SessionRingPool, sync and async worker
swaps, IORING_OP_LINK_TIMEOUT integration, and async-cancel
discipline. Trigger conditions (kernel >= 5.6, io_uring feature,
opt-in flag) and a five-step implementation plan included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant