| Age | Commit message (Collapse) | Author | Lines |
|
A failed truncate or key write returned with the descriptor still open,
so the lock was held while the page rendered uncached and the file was
left behind. It is removed before its last close, as every holder does.
|
|
process_slot logged every failure to lock, so each request that found
its slot being filled left a line, while refresh_slot logged none, so an
expired slot in a directory the server cannot write was served stale for
good without a word. lock_slot now logs the step that failed, as the
scan does, and leaves out only another request at work.
|
|
The slot lock has to be an flock, since an exec filter drops a record
lock when it closes the stdout a fill writes through. The scan only got
by with fcntl because nothing reopens its file while it runs. One kind
of lock lets the two share their code, and on Linux, where the kinds
never see each other, an flock on the scan's file now holds a scan off
like any other.
|
|
Each exec filter and snapshot compressor a fill runs inherited the slot's
lock descriptor beside the stdout it writes into. An flock lasts until
its last copy closes and nothing waits for a process a filter leaves
behind, so a fill killed before its rename could leave the slot locked,
and served stale or uncached, for as long as such a process lived.
The scan holds its lock across no exec and opens the same way so that
the two stay alike.
|
|
The header's last sentence named two of the many later subjects, so it
goes too. The second request's stderr is still kept, for the lock tests
that come next.
|
|
The library's check also lists whatever was left behind when it fails.
|
|
The slot lock was a POSIX record lock, which a process loses the moment
any descriptor on the file closes, and the fill puts the lock file on
stdout, which every exec filter and snapshot compressor closes with its
dup2. A second request on the slot could then rebuild it under the first
and splice the two pages. An flock holds until the last descriptor goes.
|
|
The slot being filled was forgotten before the page's final flush, so a
write that failed there, on a full disk for one, could not abandon the
fill: cgit died into the lock file instead and the visitor got nothing.
The mid-page path already delivered the page from the lock file.
|
|
The footer lost the time it was generated at in 2018, and both runs
come from the same binary, so the two pages have nothing to differ in.
|
|
The dynamic ttl only applied when the url named a branch with h=, so
the log, tree and refs of the default branch, which never carry one,
fell back to cache-summary-ttl. The manual already gives each ttl the
scope the code now uses.
|
|
The dumb transport reads files that already sit on the disk, so a pack
copied into a slot cost that disk twice and the request a second write
of every byte. A snapshot took a slot whatever its size, so a visitor
naming distinct refs and ids could fill the cache root with archives.
`cache-max-slot-size`, 64 MB unless set, now serves a larger response
from the lock file and drops it, along with any expired copy it would
have replaced.
|
|
|
|
|
|
|
|
|
|
t000x the ground the suite stands on: git version, html validity,
the cache
t01xx page content, one script per page
t02xx features that cut across pages: filters, submodule links,
dates, limits
t03xx defence, the security regressions and the $HOME promise
t04xx the helper tools under tools/
|