Skip to content

fix: VikingDB volcengine URI prefix loss and stale is_leaf filter#294

Merged
qin-ctx merged 1 commit intomainfrom
fix/tos_vikingdb
Feb 25, 2026
Merged

fix: VikingDB volcengine URI prefix loss and stale is_leaf filter#294
qin-ctx merged 1 commit intomainfrom
fix/tos_vikingdb

Conversation

@qin-ctx
Copy link
Collaborator

@qin-ctx qin-ctx commented Feb 25, 2026

Description

修复 VikingDB volcengine 后端的两个 bug 以及 S3 后端的一个 bug:

  1. 读取记录时 URI viking:// 前缀丢失,导致 Access Denied
  2. memory_deduplicator.py 中残留已废弃的 is_leaf 字段过滤(PR feat: break change, remove is_leaf scalar and use level instead #271 遗漏)
  3. S3 目录 rename 只移动单个文件,未处理整个子目录树

Related Issue

Fixes #288

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)
  • Performance improvement
  • Test update

Changes Made

  • VikingVectorIndexBackend 中添加 _restore_uri_fields() 静态方法,在读取记录时还原 uri/parent_uri 字段的 viking:// 前缀。在 get()fetch_by_uri()search()filter() 四个出口处调用,scroll()_remove_descendants() 经由 filter() 间接覆盖。幂等操作,对 local/http 后端无副作用。
  • memory_deduplicator.py{"field": "is_leaf", "op": "must", "conds": [True]} 替换为 {"field": "level", "op": "must", "conds": [2]},与 PR feat: break change, remove is_leaf scalar and use level instead #271 的 schema 变更对齐。
  • S3 client 新增 CopyObject()ListAllObjects() 方法;重构 s3fs.Rename() 支持目录级别的移动,通过服务端 copy + delete 递归处理整个子目录树。

Testing

  • 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)

N/A

Additional Notes

  • _restore_uri_fields()volcengine_collection._sanitize_uri_value() 的逆操作:去除首尾 / 后加上 viking:// 前缀。通过 not val.startswith("viking://") 保证对 local/http 后端幂等安全。

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@qin-ctx qin-ctx merged commit 6781df5 into main Feb 25, 2026
21 of 22 checks passed
@qin-ctx qin-ctx deleted the fix/tos_vikingdb branch February 25, 2026 14:13
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: VikingDB volcengine 后端两个问题 — URI 前缀丢失 + is_leaf 废弃字段残留

3 participants