fix: reload full records when updating uri mapping#2165
Merged
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
qin-ctx
approved these changes
May 21, 2026
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
Related Issue
Type of Change
Changes Made
-update_uri_mapping 不再直接拿查询出来的精简记录做 URI 重写,而是先收集记录 id,再通过
self.get(...) 拉取完整记录后再 upsert。另外补了两层保护:
如果没查到有效 id,直接告警并返回;
如果完整记录里缺少 dense vector,就跳过该条并打 warning。
它解决的问题是:URI 改名时,原先用的是字段不全的记录,可能缺少向量等关键数据,导致新记录写入失败、写入残
缺数据,或者 URI 映射迁移不完整。现在改成先补全原记录再写,能保证 URI 映射更新基于完整数据执行,并且在关
键字段缺失时显式失败或跳过,不再静默出错。
Testing
Checklist
Screenshots (if applicable)
Additional Notes