[Bug]: add-resource task 任务完成了,但 openviking 底层文件系统(对象存储)上没有相关文件
Issue Origin
Observed or reproduced in a real environment
Bug Description
通过 add-resource 导入目标文件到 openviking 中。add-resource task 任务显示已经完成了,但 openviking 底层文件系统(对象存储)上只有 .abstract.md 、 .overview.md 文件和一个 0B的文件,缺少目标文件
Steps to Reproduce
- 执行 add-resource 命令导入目标文件到 openviking 中
Expected Behavior
add-resource 任务完成后,openviking 底层文件系统(对象存储)上有目标文件
Actual Behavior
add-resource 任务完成后,openviking 底层文件系统(对象存储)上没有目标文件,只有 .abstract.md 、 .overview.md 文件和一个 0B的文件
Minimal Reproducible Example
Error Logs
OpenViking Version
604275f272a16f0c307229ae91127c6075b585e5
Python Version
3.11.9
Operating System
Linux
Model Backend
None
Additional Context
No response
Any log?
openviking 部署在容器上,没有捞到相关的日志
后面又执行了一次 add-resource 后。task 执行完成后,看着 openviking 底层文件系统(对象存储)上有大部分文件,但丢失了一些文件。
@uuuuf9 Can you try using main ? Seems https://github.com/volcengine/OpenViking/pull/4439 already fix.
几个能快速缩小范围的信息,麻烦补充一下:
-
那个 0B 文件的名字是什么?
- 如果就是目标文件名(如
report.pdf)→ 说明 target 被创建了但内容搬运失败(temp→final 写入路径的空写窗口) - 如果是
upload_<uuid>之类的临时名 → 说明 staged source 物化后没走到 finalize 这一条直接区分两类根因。
- 如果就是目标文件名(如
-
ov task show <task_id>(或 Task Center 详情)的 result JSON 里有什么? 特别是root_uri、vector_status、各 stage 的状态——task 标记 completed 意味着处理器认为写入成功,对比底层实际内容能定位哪一层的"成功"是假的。 -
底层 AGFS 用的哪种 backend?(本地 disk / 对象存储 S3 兼容 / TOS…)对象存储 backend 的 put 若部分失败(如 quota / 分片中断)是否被映射成了成功返回,会影响判断这是引擎问题还是 backend 适配层问题。
另外注意到报告版本 604275f2 落后当前 main 130 个 commit,期间导入路径有多处修复(含 staging/finalize 相关)——如果方便的话在最新版本(v0.4.17.1+)上重试一次,若不复现可以直接定位到已修区间,git log 604275f2..main --oneline -- openviking/utils/resource_processor.py openviking/parse/ 能看到候选。
可能和对象存储限流有关系,我调大对象存储限流的阈值,在看看吧。
后面看了一下日志,原因看着是 add-resource task 时,mv 将临时目录移动到目标目录失败,导致文件丢失了
I checked current main (a843ab6b). Independently of the original storage error, openviking/storage/viking_fs/_sync.py still catches and logs mv/rm failures inside sync_tree, then continues. Added/updated entries can also enter SyncDiff before the move succeeds. This lets the caller receive a normal result and proceed with temp cleanup despite an incomplete sync.
#4718 and #4774 address transfer/lock and vector-query failures, but neither changes this exception handling. I plan a narrow follow-up here: propagate mutation failures unchanged, record changes only after successful operations, and test that failed syncs retain staged content instead of taking the success cleanup path. Successful sync semantics will stay the same; this is not a transactional rollback guarantee for changes already applied before the failure.
The screenshot does not establish which original backend call failed, so I would keep that diagnosis separate from this source-confirmed error-propagation gap.