Repository navigation
core: 结构重排下的增量 Search 保持文档序 (#27/#164) - #175
Merged
Merged
Conversation
#164 TextSearch now tracks the document order revision and repairs its scanned prefix by rank: rewind, match and prune compare document positions instead of row ids, so a reorder neither duplicates nor drops hits. Adds search_reorder_core covering mid-scan reorder, navigation, eviction and the ordered regression.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The first revision repaired every document by rank, so continuous output re-scanned the prefix on each newline and the shell Find stream timed out at stage 4. Rank repair now applies only to unordered documents; ordered documents keep the original identity threshold. Local shell suite passes.
Owner
Author
|
补充说明:本次 push 运行的 |
5 of 6 tasks
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.
背景
#169 封存了行存储并给出精确 rank,但它明确把运行中跨结构重排的增量 Search 留作后续("开放新无序行为前需另行完整验收")。本片补上这一层:Search 不再用行 ID 做失效与游标判断。
变更
TextSearch记录document_order_revision_;notify_change检到 order revision 变化即置位order_changed_;step在原有 row 校验前先做一次repair_order()(计一个 work 单位):找到第一个不再位于自身 rank 的已扫行,只从该处重扫,之前的命中保留;已加载行移动/消失时单独重载;rewind/consume/prune/match的判定从行 ID 改为当前文档 rank与"端点是否仍存活";有序文档路径与结果顺序不变。测试
新增
search_reorder_core(4 个场景):match()全存活;本机隔离 worktree:默认 Release 构建 exit 0;
search_core+search_reorder_core+ 7 个核心 CTest + Pythoncore回归 10/10 通过(core首跑失败仅因隔离构建缺replay/receive辅助二进制,补齐后通过)。证据:README · validation.json
明确未做
Refs #27 #164 #169