Repository navigation
SWF(perf): Move issue-list Git reads off async workers - #663
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
jatmn
left a comment
There was a problem hiding this comment.
🟢 Thanks for the contribution. I do not see any actionable issues from my review.
Merge readiness
- Branch vs
main: Head is mergeable with no reported conflicts; PR base matches currentorigin/main(e4e5f36). No rebase required for stale merge-base drift. - Required checks: All required PR checks on head
46ddf165passed (fmt+clippy, stable/beta tests, release build, MSRV, CodeRabbit). - Merge gate status: GitHub reports
mergeStateStatus: BLOCKEDwith no failing checks — likely awaiting human review, not a code defect. - Related work: Builds on bounded git read infrastructure from #648; issue git paths beyond list (e.g. #204 family) remain unbounded and are explicitly out of this diff’s scope.
- Author checklist / description: CodeRabbit notes blank “Closes #” and unticked template checkboxes — hygiene only, not a merge-blocking defect for this behavior change.
Notes (non-blocking)
- Local
cargo test -p twigpine-node list_issuescould not run#[sqlx::test]cases withoutDATABASE_URL; CI already exercised them. - Batch-timeout child-reap integration test is
#[cfg(unix)]; PR body already calls out non-Unix teardown as untested.
Run issue-list Git work on a blocking thread with the shared read permits and deadline from #648.
The listing still batches issue blobs. The runner reaps timed-out Git children before releasing the permits. A Git timeout returns 504; exhausted admission returns 503 with
Retry-After.Unrelated-request p99
GET /healthGET /api/v1/repos/{owner}/cheap(repo detail, no Git)Python 3.10 over loopback, debug builds of main (
69f7f36) and this branch, same 4-vCPU Linux VM and PostgreSQL 16. Two Tokio workers. Eight closed-loop issue-list clients (read caps 16 per caller and 128 total), one bare repo with 4,000 loose issue blobs (512-byte bodies, no commits, 33 MiB on disk). No injected Git delay.Ran main, branch, branch, main. Each run had 3 seconds of warm-up and 20 seconds of measurement. Each probe route was scheduled at 25 requests/s; p99 is nearest rank over 1,000 samples per route per build, measured from scheduled send to full response. It includes client queueing under load (16 shared probe threads). Every probe returned 200. Within the measurement windows, main completed 207 issue lists and the branch completed 323, all 200.
Response identity
git_errordiff -uexited 0 for both JSON bodies. The timeout regression forces the batch child to hang and checks for a reaped child and 504.cargo fmt --all -- --checkandcargo test --locked --workspacepassed. Strict Clippy on Rust 1.99 reports the same fourclippy::double_must_useerrors on main and this branch atblockstore/mod.rs:114. With that lint alone allowed, workspace Clippy passes.Try it
With
DATABASE_URLset to local PostgreSQL 16+:cargo test -p twigpine-node list_issuesUntested: production traffic, packed or remote-backed fixture repos, non-Unix teardown.
Summary by CodeRabbit