fix(search): 全量校对时清理已删除消息 - #154
Closed
qq666666qq wants to merge 1 commit into
Closed
qq666666qq wants to merge 1 commit into
qq666666qq wants to merge 1 commit into
Conversation
Contributor
|
想请教一下,这里的“源消息删除”在实际使用中,通常会由什么操作触发?能否举一个从用户操作到触发索引清理的具体例子,方便理解这个修复覆盖的场景? |
Contributor
Author
嘿嘿,这是防撤回功能,我看错了 |
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.
问题
原因
本地语义索引的全量校对会复用现有 generation,但此前只会写入当前快照中仍然存在或发生变化的消息。任务结束时的
prune只按账号、会话和时间范围裁剪,没有比较本轮完整快照与已有索引。因此,已经从源消息中删除的 source、片段成员和向量仍会保留。
表现
后果
修改
验证
运行:
python -m pytest -q tests/test_local_search.py tests/test_local_search_totals.py tests/test_local_search_reading.py tests/test_local_search_progressive.py结果:
84 passed in 24.06s