Repository navigation
feat(aivision): enable managed query acceleration by default - #12
Merged
Merged
Conversation
webup
marked this pull request as ready for review
October 25, 2026 12:46
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.
Description
Provide standard revision-checked native Trace and complete-Session query acceleration for AI Vision. Batch selected Session summaries and read verified versioned STORED Token values without separate strategy switches. Missing/mismatched stored definitions retain the internal JSON strategy; database/permission/invalid-result failures remain errors. Known zero and missing usage retain distinct semantics.
Automatically migrate and maintain the derived schema under a shared generation/lease fence. The matching OceanBase provider is the initialization/retry owner; an internal marker prevents ingestion from repeating that initialization while preserving standalone bootstrap behavior. Backfill enrolls up to 25 sources with one UPSERT, retaining the same fence, revision checks, atomic cursor and soft work budget; this reduces statement count without a throughput guarantee. Publication shares one RC transaction/fence/Commit for at most 25 items, retains every per-Trace scope/revision/generation check, and returns success only after Commit; current-chunk SQL or Commit failure rolls back while earlier chunks can remain committed. Healthy startup preserves coverage; interrupted cleanup resumes in 256-row committed batches so raw writers can progress. Maintenance OFF is sticky across replicas; only explicit admin + deployment-key recovery can clear it. Snapshot/publication checks both source revision and maintenance generation, preventing a delayed pre-resume publication from passing after revisions restart.
Add bounded batch source/publication and one-repeatable-read window APIs. Recovery merges clean summaries with dirty/unprojectable/boundary raw Traces, or reads raw only, preserving full canonical content and physical authorization. Source bytes, per-Span bytes, Trace/Span counts and the actual compact JSON envelope are bounded before accumulation. No successful partial list is returned. Ordinary SQL/query deadlines remain unchanged; only the explicit Resume HTTP request gets a four-minute server budget; the management command also performs one normal maintenance iteration and can take longer. The product sends the existing
timeout: 240header for that action so the global API timeout middleware preserves its deadline; other requests remain unchanged.Only
SIGNOZ_AIVISION_PROJECTION_MAINTENANCE_ENABLEDremains on this side (default true); product readers useAIVISION_QUERY_MODE=auto|raw. Retired strategy/authoritative flags no longer select runtime behavior. External raw SQL/retention/restore must suspend and rebuild maintenance.Validation
Current SigNoz
22e936bf647ba2042810d71fa200e6cbbb468aab:The CE full-recovery observation includes a 327.9s management command and a separate 1450.6s later count-poll wait. This remains a material operational cost, separate from ready-list latency; the two timing phases do not measure pure cleanup or database throughput.
Full current-default report and sanitized samples. Earlier adverse distributions and opt-in paired comparisons are retained separately; no cross-time/cross-engine improvement is inferred. Independent implementation/operational reviews closed the confirmed findings. Substantive implementation/review used Codex agents.
Companion product and documentation
https://github.com/ob-labs/ai-vision-ob/pull/114 (
2bdb1fbb4b5af0082211174334d32231bf901437)https://github.com/ob-labs/ai-vision-docs/pull/20 (
ff59069a5d9957e0925f141c62506391da72411f)Tests use prepared Mac/Docker clones and real handlers/store/SQL, with fixed private auth replacing full SigNoz auth while loading its actual timeout middleware; full startup is bypassed. amd64-emulated seekdb and native-arm64 CE have different resource settings. Full service startup/authentication, released images, Kubernetes, cold/WAN latency and capacity are unverified. Matching product/data-plane builds are required for the new managed contract. Raw recovery is bounded but resource-heavy. This PR remains draft; no merge or deployment is performed.
Hosted
query-regressionpassed on the current SigNoz head. The two real-database SQL matrices above are separate local evidence.