zzDB opened a new issue, #17286: URL: https://github.com/apache/dolphinscheduler/issues/17286
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened 我们通过 API 调用了 补跑接口,仅传入了一个 schedule_time,且设置为 串行执行(serial) 模式。全局参数中存在一个 具有唯一性的参数。 任务触发执行后,我们发现数据库中生成了 两条完全相同的 process_instance 记录,它们的: • schedule_time • start_time • command_start_time • command_params • global_params 这几个字段的值 完全一致。 <img width="1287" alt="Image" src="https://github.com/user-attachments/assets/775fd7b3-f566-4ba9-8928-c0e7602a549b" /> 我们检查了 APIServer 的日志,只看到插入了一条带有唯一性参数的 command 记录。 但通过数据库查询,发现 process_instance 表中存在两条相同记录。 进一步查看 Master Server 的日志,发现是 两台不同的 Master 节点分别创建了这两条 process_instance,即它们都处理了同一条 command。 <img width="1448" alt="Image" src="https://github.com/user-attachments/assets/608bad5c-8157-42f4-9d2d-bda47eb951f4" /> <img width="1416" alt="Image" src="https://github.com/user-attachments/assets/b50e8eea-4368-4ca3-9801-ea7714f4755e" /> 🔍 关键观察 • process_instance 表中存在两条相同的流程实例记录。 • start_time、schedule_time、command_start_time、command_params、global_params 等字段完全一致。 • API Server 日志中仅插入了一条 command。 • Master Server 日志显示 两台 Master 分别处理了同一个 command 并创建了流程实例。 📎 补充说明 • 由于使用的是 OceanBase 数据库,怀疑可能与其事务隔离性或并发特性有关,导致两个 Master 同时扫描到同一条 command 并处理。 • 该问题破坏了串行补跑的幂等性,可能会导致业务逻辑异常或资源竞争 ### What you expected to happen 在补跑接口串行执行、且 schedule_time 唯一的场景下,只能创建一条 process_instance 记录。 ### How to reproduce 任务运行一段时候后偶尔出现 ### Anything else _No response_ ### Version 3.2.x ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
