s3proxy: Go backend disconnect behind an env var - #47
Merged
Merged
Conversation
The Go cache's MinIO write-through is being cut in a one-region canary. BAZEL_REMOTE_GO_BACKEND_DISCONNECT=1 makes every Go-cache request bypass the S3 backend — Get and Contains answer clean misses for all entry kinds (counted on backendLookupsSkipped with the new go_disconnect reason, distinct from the always-on go_ac AC-only skip) and Put closes the payload without enqueueing (counted on the new bazel_remote_s3_backend_uploads_skipped_total counter, deliberately with no operation outcome: the web-side accounting reads dropped/error/rejected statuses as failures). The toggle is read once at proxy construction and threaded to every backend, so it covers both single-backend and multi-backend map mode; the env var makes roll-in/roll-out an inventory env change rather than a binary roll. With Puts skipped, the L1's forwarded-to-created accounting for Go flatlines — intended, paired with a web-side enforcement pause during the canary window. Co-authored-by: Cursor <cursoragent@cursor.com>
Completes the disconnect's zero-S3-ops contract: with the toggle on, a Go namespace's advisory LRU artifacts stop uploading along with the cache bytes they describe (their only consumer, the web retention sweep, is paused for Go namespaces during the canary). Skips are successful no-ops counted on backend_uploads_skipped_total - failing them would make the flusher log every pass. Keyed on the artifact key (tool segment before lru/) because flush timers carry no tenant context. Co-authored-by: Cursor <cursoragent@cursor.com>
shreyas-blacksmith
marked this pull request as ready for review
September 17, 2026 21:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cut itself, per the go-l1-minio-disconnect design (default-to-cut, one-region canary):
BAZEL_REMOTE_GO_BACKEND_DISCONNECT=1makes every Go-cache request bypass the S3 backend entirely.What
backendLookupsSkipped{reason=go_disconnect}— distinct from the always-on AC-onlygo_acskip it extends.bazel_remote_s3_backend_uploads_skipped_total— deliberately no operation outcome, since web accounting reads dropped/error statuses as failures and a policy skip is neither.…/go/lru/…) skip as successful no-ops — the zero-S3-ops contract covers advisory writes too; their only consumer (the retention sweep) is paused for Go namespaces during the canary window.What it deliberately does NOT do
Measurement
Rides the observability released in v2.6.1-blacksmith.8: census (per-tenant resident/put/hit/evict), byte-weighted eviction ages, retention window, plus the skip counters above for cut verification (
bazel_remote_s3_*for Go pinned at zero).Testing
go test+bazel testgreen oncache/s3proxy: skip coverage for all kinds × both Go-detection paths, put-enqueue gating on/off, artifact-key classification, and non-Go traffic untouched.Made with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled. (Staging)