Skip to content

fix(retrieve): 分布式 openGauss 回退到普通召回 - #4

Merged
heaoxiang-ai merged 1 commit into
heaoxiang-ai:codex/auto-recall-event-time-decayfrom
qin-ptr:fix/opengauss-event-decay-fallback
Nov 24, 2026
Merged

heaoxiang-ai merged 1 commit into
heaoxiang-ai:codex/auto-recall-event-time-decayfrom
qin-ptr:fix/opengauss-event-decay-fallback

Conversation

@qin-ptr

@qin-ptr qin-ptr commented Nov 24, 2026

Copy link
Copy Markdown

Description

#8093 给自动召回默认传入 events_time_decay_protection: "30d"。分布式 openGauss 无法执行事件衰减的高级排序。旧路径会把这个错误记入 Context API 的 retrieval_errors,导致本可召回的事件缺失。

用同一个有匹配事件的 Context 请求核对。修改前,加 30d 后响应为 HTTP 200,事件数从 1 变成 0。修改后,加或省略 30d 时都返回同一条事件,HTTP 都是 200,retrieval_errors 为空。

Changes Made

  • 租户向量检索按本次请求实际使用的账号后端判断是否支持事件衰减。分布式 openGauss 直接执行普通查询,沿用原有过滤、排序和分页。
  • 支持衰减的后端继续分别检索事件和其他结果。保护期参数仍按现有格式校验。
  • 补充普通查询和衰减查询的契约断言,并更新中英文检索文档。

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

跟进 volcengine/OpenViking#8093。

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Test update

Testing

  • 向量范围、openGauss 适配器和层级检索共 107 项通过。

  • Context API 原有套件 14 项通过。

  • Context HTTP 对照验证通过,走真实分布式适配器分支,数据库查询使用替身。

  • Ruff lint、格式检查和 git diff --check 通过。

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • I have tested this on the following platforms:

    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

不适用。

Additional Notes

修复在服务端检索路径生效。目标分支为 volcengine#8093 的当前源分支。

默认衰减请求会进入分布式 openGauss 不支持的高级排序分支,导致自动召回丢失结果。按实际账号后端判断支持情况,无法应用衰减时直接执行原有查询。

Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
@heaoxiang-ai
heaoxiang-ai merged commit 0af5ef5 into heaoxiang-ai:codex/auto-recall-event-time-decay Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants