Skip to content

perf(p2p-14): add adaptive read-path bypasses (#671)#749

Closed
jlon wants to merge 26 commits intoCurvineIO:mainfrom
jlon:p2p-14-adaptive-read-performance
Closed

perf(p2p-14): add adaptive read-path bypasses (#671)#749
jlon wants to merge 26 commits intoCurvineIO:mainfrom
jlon:p2p-14-adaptive-read-performance

Conversation

@jlon
Copy link
Copy Markdown
Contributor

@jlon jlon commented Mar 26, 2026

Summary

  • Add adaptive read-side optimizations after the data-plane fast path is isolated.
  • Fold the reduced-intrusion follow-up that extracts the internal read-acceleration boundary, while keeping filesystem API narrowing and harness migration out of this PR.

Design

  • Keep adaptive behavior and read-path internals together: the same slice now owns adaptive EWMA state, read-flight coordination, and local accelerated-cache state.
  • Preserve the existing read order and worker fallback semantics; telemetry expansion still lands later in p2p-16.

Implementation

  • Add curvine-client/src/file/read_accelerator.rs and move read-chunk cache, read-flight locks, adaptive bypass state, and P2P read attempts behind that boundary.
  • Rewire block_reader, fs_context, and fs_reader_base to use the new boundary without changing the worker fallback path.
  • Keep only the minimal compatibility hooks needed so later slices can narrow the public filesystem surface cleanly.

Verification

  • cargo clippy -p curvine-client --all-targets -- -D warnings
  • cargo test -p curvine-client --lib read_accelerator -- --nocapture
  • cargo test -p curvine-client --lib block_reader -- --nocapture

Review Note

  • This split series still targets main, so GitHub shows cumulative diff.
  • The intended incremental scope for this PR is the delta from p2p-13 to p2p-14: adaptive read-path work plus the internal read-acceleration boundary extraction.

@jlon
Copy link
Copy Markdown
Contributor Author

jlon commented Mar 26, 2026

Part 14/17 of the split P2P series that supersedes #671.

This PR targets , so the visible diff is cumulative. Review the slice described in this PR body instead of treating the whole diff as new.

Intended review delta is p2p-14 on top of #750.

@jlon
Copy link
Copy Markdown
Contributor Author

jlon commented Mar 26, 2026

Review note: this is part 14/17 of the split P2P series that supersedes #671.

This PR targets main, so the visible diff is cumulative. Please review the slice described in this PR body.

Review after #750.

@jlon jlon force-pushed the p2p-14-adaptive-read-performance branch from 7bf5bd9 to cbae9f8 Compare March 26, 2026 10:26
@jlon jlon force-pushed the p2p-14-adaptive-read-performance branch from cbae9f8 to c032cd5 Compare March 27, 2026 09:33
@jlon jlon force-pushed the p2p-14-adaptive-read-performance branch from c032cd5 to 1a3ee2b Compare March 30, 2026 00:55
@jlon jlon closed this Apr 7, 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.

1 participant