Repository navigation
Avoid JIT compilation on measured assistant reads - #248
Merged
Merged
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.
Production chat-list reads spent substantial time compiling a large authorization query: EXPLAIN selected 13,751 JIT functions. Add an explicit transaction-local JIT opt-out for measured assistant-profile, notification and chat-list GET routes. Keep the authorization SQL and response fields unchanged, preserve primary/replica consistency routing and the profile's primary repeatable-read snapshot, and reset the setting automatically at transaction end.
A controlled production read used one read-only repeatable-read snapshot: JIT on 19.4s, off 8.2s, with identical complete JSON hashes (50 rows, one query each). This is one comparison, not a p95 claim; residual planning/execution time remains.
Validation: 23 focused database/HTTP/profile/origin/notification tests passed, including JIT result parity, read-only enforcement, pooled setting reset after commit and failures, private/retained summary filtering, and primary/replica routing. Backend typecheck, scoped formatting and diff checks passed. No global database setting changes. Hosted CI is not awaited per maintainer instruction.