Skip to content

Accept only revisions with builds in URLs, and bound revision walks - #22

Closed
samth wants to merge 1 commit into
racket:masterfrom
samth:bounded-revision-walks
Closed

samth wants to merge 1 commit into
racket:masterfrom
samth:bounded-revision-walks

Conversation

@samth

@samth samth commented Oct 1, 2026

Copy link
Copy Markdown
Member

find-previous-rev counted down one number at a time until it found a revision with logs, and the URL rules took any integer as a revision. A request whose revision was a Unix timestamp, such as /1489401258/..., therefore walked about 1.5 billion numbers, checking each one's directories and archive; four such requests kept the renderer at a full core for days, slowing every build by about 5%.

The builds below 70000 cannot change, so write down what the renderer can show: every push from 50000 has a build with logs (in a "logs" directory or an archive), except for 13 missing ones. Newer pushes are checked against the build directories. A new URL argument, known-rev-arg, matches only a revision with a build, so any other number matches no rule and gets a 404, and find-previous-rev stops at the oldest build and answers from the static history without touching the filesystem.

The rendering tests used revisions 100-104, which the static history rules out, so they now use 70100-70104.

`find-previous-rev` counted down one number at a time until it found a
revision with logs, and the URL rules took any integer as a revision. A
request whose revision was a Unix timestamp, such as /1489401258/...,
therefore walked about 1.5 billion numbers, checking each one's
directories and archive; four such requests kept the renderer at a full
core for days, slowing every build by about 5%.

The builds below 70000 cannot change, so write down what the renderer
can show: every push from 50000 has a build with logs (in a "logs"
directory or an archive), except for 13 missing ones. Newer pushes are
checked against the build directories. A new URL argument,
`known-rev-arg`, matches only a revision with a build, so any other
number matches no rule and gets a 404, and `find-previous-rev` stops at
the oldest build and answers from the static history without touching
the filesystem.

The rendering tests used revisions 100-104, which the static history
rules out, so they now use 70100-70104.
@samth

samth commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Duplicate of #21, which merged this same commit as 00829ee.

@samth samth closed this Oct 2, 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