Repository navigation
perf: reduce vector encoding and runtime verification overhead - #2621
Conversation
|
Teingi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
hidb4ai
left a comment
There was a problem hiding this comment.
Requesting changes for the missing dependency in the isolated native-resource build environment.
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed bef86938. The previous resource-build P2 is fixed: a fresh locked Python 3.12 build-host environment now runs both managed-resource entry points and the resource tests. I found no new PR-introduced correctness issue or database/public API additions.
Merge readiness is still blocked by dsh-package and cindy-package: rebuilding changes integrations/dsh/plugins/dsh-pet/lib/index.js and integrations/cindy/plugins/powercontext-hooks/node/worker.cjs, so their generated-file checks fail. The same diffs occur in base commit 38c38846's CI, and their sources, build inputs and checked-in bundles are unchanged by this PR; this is an inherited baseline failure, not another finding against the optimizations. Please synchronize the generated bundles and rerun CI before merging. Approval remains pending a green CI result.
Which issue or RFC does this PR close?
Related: RFC 1400, RFC 1771, and RFC 1809.
Rationale for this change
OceanBase vector requests spend CPU formatting individual Python floats, Source batches issue one evidence INSERT per accepted observation, and startup verification fetches each current projection and its full vector separately. Reduce those costs while preserving the existing persistence and admission contracts.
What changes are included in this PR?
Are there any user-facing changes?
No public API or database schema changes. Stored float32 values and existing Source evidence remain compatible. This PR contains only these three optimizations and their validation/dependencies on current master, which already includes PR #2567.
How was this change tested?
make checkanduv run prek run -apassed. After incorporating master38fb3508,make checkpassed again; the merged Git tree is byte-identical to the combined experiment, whose related suite passed 107 tests with 1 optional test skipped.f78eea55: related vector, Source, projection, migration and Topic Memory tests: 113 passed, 1 skipped with real OceanBase enabled. Only the opt-in seekDB migration case was skipped. Native vector tests use deterministic fixtures, not provider calls.Performance evidence
Chinese report, raw evidence and reproduction scripts. The measured integrated tree
706ec284is byte-identical to this PR head941d74fe.38fb3508, two ordered/reversed real-OceanBase module comparisons measured SDK hybrid query throughput 117.94 → 145.10/s (+23.0%), CPU/query 8.376 → 6.755 ms (-19.4%), and complete startup verification 13.09 → 11.20 s (-14.5%). SDK queries reuse persisted vectors and do not call the provider or HTTP layer. Forty 32-Source batches reduced evidence INSERT calls 1,280 → 40 and CPU/Source by 50.2%; bindings and duplicate positions remain valid..envis unchanged.AI usage statement
Implementation, review and validation were assisted by OpenAI Codex (GPT-6).