Repository navigation
Avoid cloning pinned IVF exact-membership filter columns - #29583
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
CI failure root cause and minimal correction:
Validation: the full test package graph reproduces the cycle before the fix and passes afterwards (1,333 nodes). The five affected packages pass normal tests; docfilter and rscthrottler pass complete race tests; the production-policy race test passes 100 repetitions. An independent source review found no additional correctness or lifecycle blocker in the original scoped-cache implementation. The complete I also synchronized current main Final-head validation at |
|
@XuPeng-SH 已复核最新修正 |
XuPeng-SH
left a comment
There was a problem hiding this comment.
审查 commit:26004750d9f1870ea84882c77898af33b32ca5a7(base:b210a0a5fc878e1e7d04c371297687de003ba292)。结论:APPROVE。完整检查全部 13 个文件的增量、现有职责归属与调用链,未使用 subagent,未发现未闭合的 blocker。
上一轮 P2 性能退化已确认修复:BlockIO 按实际 filter 列类型选择 scoped 路径,全 fixed-width 保留真实旧 callback 和 reader-owned reusableSels;membership-only 的 scoped search 只为实际命中分配 offsets,无命中不分配,没有新增可变 buffer/cache owner。本机真实 ConstructBlockPKFilter -> BlockDataRead 基准(Darwin arm64 / Apple M4、8,192 行持久化缓存块、GOMAXPROCS=2、200ms × 3)确认 fixed-width 的 no-hit / single-hit / dense 两路径分别同为 9,056 / 10,128 / 10,776 B/op,allocs 也完全一致,原先额外 65,536 B/block 已消除。compound-varchar 三组每次均减少 499,712 B,耗时中位数分别降低 30.1% / 28.2% / 12.8%。这些是缓存块级 consumer 结果,不外推为端到端 IVF QPS。
设计与 unhappy path:闭合的只读 membership descriptor 复用现有 ObjectIO scoped binding 和 IOVector pin;借用 Vector 在 pin 释放前收尾,membership filter 仍由 reader Close/reset 管理。Top-K、输出物化、tombstone、rowid 与统计共用既有执行职责。未知 filter、任意 callback 的 varlen snapshot 边界及不适用优化的旧路径有实际消费者,应保留;未引入重复状态机、校验、长期存储或后台执行机制。检查了具体 Go/C filter 的只读行为、部分读取失败清理、取消、finalize 错误和并发缓存读取。Q1 所有权、Q2 等待、Q3 增长约束均闭合。
上一轮测试正交性意见已落实:现有四行 persisted fixture 的 PK={0,1}、membership={1,3}、交集={1},并包含双方分别命中但交集为空的控制,以及真正 membership-only 的 no-hit / single-hit / NULL;覆盖三种 concrete filter。未知实现、typed-nil、secondary length mismatch fail-open、callback snapshot 隔离、pin release 和 tombstone/stats 控制仍保留。真实 consumer benchmark 对照实际旧 callback,并明确 cache-hit、重置 Top-K heap、复用输出,修正了原 benchmark 仅比较 binding 而遗漏缓冲复用代价的问题。
增量分别审视:实现 +230/-46(净增 184),测试 +850/-50(净增 800),文档 0。测试增量较大,其中 239 行提供此前缺失的真实 consumer 性能对照;结果与生命周期验证复用小型 persisted fixture。docfilter integration test 外移用于消除真实 test import cycle,保留原 admission/release 断言并在 fatal assertion 前释放、等待全部 worker;prepared-authorization fixture 使用当前职责所属 helper。未发现无消费者字段、替代后遗留执行逻辑或需要阻止批准的低价值抽象。
验证:当前 head 本地三个 owning/consumer 包的七个具名 focused tests 全部通过,真实 consumer benchmark 全部通过;复核所有实质性 review comments 已闭合。当前 exact-head CI 37121182308 已完成并通过,包含 build、SCA、Ubuntu UT、coverage、适用的 proxy / multi-CN pessimistic BVT 和 CI Required;已核对 run headSha 与 UT checkout。跳过的模式不计为通过证据。未运行新的 nightly/TKE 或完整 IVF QPS workload。
Merge Queue Status
This pull request spent 35 minutes 21 seconds in the queue, with no time running CI. ReasonPull request #29583 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29578
What this PR does / why we need it:
The exact-membership Top-K path already pins its filter-column IOVector, but then calls
MustVectorToCached, whose validated snapshot clones the entire column. Profiles in #29578 identify this avoidable copy in IVF PRE filtering. This change removes that copy for a closed, read-only operation without weakening the existing arbitrary-callback boundary.Change and safety boundary
Validation
Using native artifacts rebuilt from this worktree:
pkg/objectio,pkg/vm/engine/readutil, andpkg/vm/engine/tae/blockiotests: PASS, normal and race.go vet, incremental golangci-lint, gofmt and diff whitespace checks: PASS.An 8192-row compound-key binding + membership microbenchmark (three repetitions):
This reduces allocation bytes by about 97.5% and this microbenchmark's time by about 39%. It is not a claim of equivalent end-to-end IVF QPS recovery: object layout, merge state, membership probing and vector reads also contribute to the incident. A full nightly/TKE run was not executed for this PR.