Skip to content

[Bug] Fix incorrect IO type name in AsyncIOParameter JSON constructor #1722

@LHT129

Description

@LHT129

Description

The JSON constructor of AsyncIOParameter was incorrectly using IO_TYPE_VALUE_BUFFER_IO instead of IO_TYPE_VALUE_ASYNC_IO. This could cause type identification issues when creating AsyncIOParameter from JSON configuration.

Background

In src/io/async_io_parameter.cpp, the JSON constructor at line 26 was passing the wrong type identifier to the base class:

AsyncIOParameter::AsyncIOParameter(const vsag::JsonType& json)
    : IOParameter(IO_TYPE_VALUE_BUFFER_IO) {  // BUG: should be IO_TYPE_VALUE_ASYNC_IO

This was a copy-paste error. The default constructor correctly uses IO_TYPE_VALUE_ASYNC_IO.

Fix

Changed line 26 from IO_TYPE_VALUE_BUFFER_IO to IO_TYPE_VALUE_ASYNC_IO.

Impact

This fix ensures:

  • Correct type identification when creating AsyncIOParameter from JSON configuration
  • Consistent behavior between default constructor and JSON constructor
  • Proper ToJson() serialization and deserialization

Related

  • Original task file: agent-hive/tasks/2026-03-18-修复-asyncioparameter-构造函数类型名错误.md

Metadata

Metadata

Assignees

Labels

created-by-AIThe issue is found and created by AI Agent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions