Repository navigation
Conversation
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.
Summary
Cached reads can exhaust their SQL deadline while waiting for a cache miss. Add opt-in
sql_timeoutfor cached:oneand:manyqueries, starting the SQL context inside the database callback. Existingtimeoutremains the overall budget; existing queries retain their behavior.For example,
timeout: 1splussql_timeout: 250msallows a slow cache miss without giving SQL a full second. Earlier caller deadlines still win. Cache keys, TTLs, invalidation and public method signatures are unchanged.Generation and baseline checks
Fix 115 existing full-vet warnings in the SQLite ANTLR generation pipeline. Move the generated unused-label workaround before its label rather than after return. Keep ANTLR 4.13.1, grammar and parser tables unchanged; the generated diff is exactly 115 goto moves. A helper regression checks both exit paths, idempotence, compilation and vet.
Verification
Go 1.26.8:
make build CGO_ENABLED=0 COMMIT_HASH=v2.4.0-devCGO_ENABLED=0 go vet ./...go run ./scripts/test-local -- go test -count=1 -tags=examples -timeout=20m ./...CGO_ENABLED=0 go build ./...in the root and generated fixture modulemake fmt; unrelated existing formatter churn restoredmake sqlc,make sqlc-verify, unchanged generated output andgo test -race -count=1 -p 1 -timeout=10m ./pkg/usecasesNo database migration or runtime dependency change. Consumer adoption is opt-in. Redis transport deadlines remain the consumer's responsibility.