Document the repodata fingerprint invariant #178
Reference in New Issue
Block a user
Delete Branch "benvin/repodata-fingerprint-invariant"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The cache_repodata fingerprint (count, max id) only detects every change while one writer at a time touches a remote's rows; with interleaved writers a late-committing lower id plus a delete can leave it unchanged. In the deployed server, github_rpm scans run under the per-remote sync lease, which holds only while the lease outlives the scan timeout.
GitHubProvider.onRequestfalls back torefresh()/runScan(internal/provider/rpm/github.go:243,417) with no lease whenp.syncer == nil(production wires it at internal/server/server.go:91) → say "in the deployed server" or drop "guarantees".syncLeaseDuration(15m, syncer.go:22) >defaultScanTimeout(10m, github.go:48); nothing pins that → mention the dependency in the comment or add a one-line test assertingsyncLeaseDuration > defaultScanTimeout.repoName(local rpm repos write via AfterUpload/AfterDelete unserialised) → scope it to "github_rpm remotes" and wrap.p.scanTimeoutis the value the syncer actually uses (syncer.go:228) and is overridable → fine as a guard, but the comment/doc should say "default scan timeout" if kept exact.refreshrunsrunScanwith no lease (comment at github.go:236 acknowledges this). The new docs say "the sync lease serialises scans" unqualified → word it as "when the background syncer is enabled (always, in the deployed server)".