Skip to content

Avoid unnecessary archive-index lookups and retries for releases without documentation. - #3673

Merged
syphar merged 3 commits into
rust-lang:mainfrom
syphar:no-retry
Nov 3, 2026
Merged

syphar merged 3 commits into
rust-lang:mainfrom
syphar:no-retry

Conversation

@syphar

@syphar syphar commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

This week I'm fighting a new crawler with a traffic pattern that brings our webserver to its limits, and even broke the build servers last night.

Here the first of some more optimizations.

Target redirects for releases without docs

The rustdoc version dropdown generated target-redirect links for every release, including failed builds and binary crates.

Previously, following one of these links loaded crate details and checked storage for a rustdoc archive index. When the index was missing, the handler eventually redirected to a rustdoc search URL,
which redirected again to crate details.

Now:

  • Dropdown entries for releases without docs link directly to crate details.
  • Existing target-redirect URLs check rustdoc_status and redirect directly to crate details before loading additional crate details or accessing storage.
  • Releases with docs retain the existing item lookup and search fallback.

Retrying missing archive indexes

The archive-index cache treated a confirmed storage PathNotFoundError as a potentially repairable failure. It retried up to five times, including local cache purges and repeated download attempts.

Now, confirmed missing-index errors return immediately. Other failures retain the existing repair and retry behavior.

Under crawler load, the previous behavior amplified storage requests, filesystem operations, and warning logs for unavailable documentation.

@syphar syphar self-assigned this Nov 3, 2026
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Nov 3, 2026
@syphar
syphar marked this pull request as ready for review November 3, 2026 14:18
@syphar
syphar requested a review from a team as a code owner November 3, 2026 14:18
@syphar

syphar commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

r? @GuillaumeGomez

@rustbot rustbot assigned GuillaumeGomez and unassigned syphar Nov 3, 2026
Co-authored-by: Guillaume Gomez <[email protected]>
@GuillaumeGomez

Copy link
Copy Markdown
Member

Thanks!

@syphar
syphar merged commit 371fc84 into rust-lang:main Nov 3, 2026
11 checks passed
@syphar
syphar deleted the no-retry branch November 3, 2026 15:01
@github-actions github-actions Bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Nov 3, 2026
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Nov 3, 2026

This branch was previously deployed

1 inactive deployment
github-pages — 816477a1 Deployed Nov 3, 2026 by syphar via deploy #893
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