Repository navigation
fix(agent): page pricing events during database organization - #1643
Merged
Merged
Conversation
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.
数据库整理在保留已结束运行的用量和模型切换记录时,会一次读取全部记录;超过底层 257 条的读取上限后,整个会话因
change selection exceeds page budget被跳过。改为按记录 ID 分页读取,每批最多 256 条,同时按元数据、上下文和符号的字节大小限制页面。全部分页仍在原有回收事务内完成,保留失败时回滚,成功后才回收源过程记录。
补充 257、258、512、513 条记录及较大元数据的回归用例,检查保留内容一致、源过程记录回收和重复整理;更新查询计划用例,确认分页继续使用定价记录索引。
验证:
rustup run 1.99.1 cargo fmt -p future-agent --check通过。rustup run 1.99.1 cargo clippy -p future-agent --all-targets -- -D warnings通过。git diff --check通过。本 PR 仅包含 Agent 数据库整理的分页修复及相关回归用例。