报告ID重复写入数据库失败导致一直显示未执行

cat /opt/metersphere/logs/result-hub/error.log
2025-08-06 17:10:04,080 [MS-KAFKA-LISTENER-TASK-959] ERROR i.m.r.api.listener.ApiReportTask ? - Method[run][org.springframework.dao.DuplicateKeyException:

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’

The error may exist in io/metersphere/api/mapper/ApiScenarioReportLogMapper.xml

The error may involve io.metersphere.api.mapper.ApiScenarioReportLogMapper.insert-Inline

The error occurred while setting parameters

SQL: insert into api_scenario_report_log (id, report_id, console ) values (?, ?, ? )

Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’

; Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’]
org.springframework.dao.DuplicateKeyException:

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’

The error may exist in io/metersphere/api/mapper/ApiScenarioReportLogMapper.xml

The error may involve io.metersphere.api.mapper.ApiScenarioReportLogMapper.insert-Inline

The error occurred while setting parameters

SQL: insert into api_scenario_report_log (id, report_id, console ) values (?, ?, ? )

Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’

; Duplicate entry ‘1061784635056129’ for key ‘api_scenario_report_log.PRIMARY’

任务中心显示执行中,里面有些步骤显示未执行,获取不到日志


查了下各种方法,AI说可以启用
metersphere-linux.properties中:
id.generator.type=enhanced-snowflake
snowflake.worker-id=0
snowflake.datacenter-id=1
最初试过一次好像没再出现了,后面重新部署又有这个问题了,增强版雪花算法有用吗?还是有别的方法解决报告ID重复的问题
版本:v3.6.5-lts

是迁移服务出现的吗?

这个问题知道咋搞不 一直断断续续出现

顺便问一下如果想使用websocket协议,task-runner支持吗,还是只要有插件就可以了?

需要websocket 接口插件,这个插件 只支持企业版

支持自行二次开发吗 还是会有什么限制不?

可以自己开发插件,不提供示例 https://metersphere.io/docs/v3.x/dev_manual/api_plugin_dev/#24

我看这里没有websocket的采样器 是不是要自己放到哪个地方?

开发完插件 要上传到 【系统设置】-【插件管理】里