Skip to content

错误(导入):缓冲操作导致同一文件查找引用中断  #2806

Description

@yinlianghui

界面重现

使用真实的 showcase_category 对象。

开始导入前,先在数据库中创建以下记录:

字段
name QA-2806-Existing-Parent
parent 为空

导入以下 CSV:

name,parent
QA-2806-Control-Child,QA-2806-Existing-Parent
QA-2806-New-Parent,
QA-2806-New-Child,QA-2806-New-Parent

CSV 中的三行数据分别是:

CSV 行 name parent 内容
1 QA-2806-Control-Child QA-2806-Existing-Parent 引用数据库中已经存在的父记录
2 QA-2806-New-Parent 为空 在本次导入中创建新父记录
3 QA-2806-New-Child QA-2806-New-Parent 引用第 2 行创建的父记录

实际结果

创建 2 行,跳过 1 行。

  • 第 1 行创建成功,并解析到数据库中已有的父记录。
  • 第 2 行成功创建 QA-2806-New-Parent
  • 第 3 行被跳过,并返回 no showcase_category matches
  • 接口和 SQLite 核对结果确认,第 1、2 行已经写入,第 3 行没有写入。

同一文件中的引用未找到

使用新的唯一名称重复执行了两次界面场景,两次结果相同。

判定依据

因此,这是写入性能优化改变既有 Import 可观察语义所造成的确定性回归,应当作为 Bug 处理。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions