github-actions[bot] commented on issue #17286: URL: https://github.com/apache/dolphinscheduler/issues/17286#issuecomment-3004148698
### 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 We called the fill-run interface through the API, only one schedule_time was passed in, and it was set to serial execution mode. There is a unique parameter in the global parameter. After the task triggers execution, we find that two identical process_instance records were generated in the database, theirs: • schedule_time • start_time • command_start_time • command_params • global_params The values of these fields are exactly the same. <img width="1287" alt="Image" src="https://github.com/user-attachments/assets/775fd7b3-f566-4ba9-8928-c0e7602a549b" /> We checked the APIServer logs and saw that a command record with unique parameters was inserted. However, through database query, it was found that there were two identical records in the process_instance table. Looking further at the Master Server logs, we found that two different Master nodes created these two process_instances, that is, they both processed the same 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" /> 🔍 Key Observation • There are two identical process instance records in the process_instance table. • The fields such as start_time, schedule_time, command_start_time, command_params, global_params, etc. are completely consistent. • Only one command is inserted in the API Server log. • Master Server log display Two masters process the same command and create process instances. 📎 Additional Instructions • Since using the OceanBase database, it is suspected that it may be related to its transaction isolation or concurrency characteristics, causing two masters to scan to the same command at the same time and process it. • This problem undermines the idempotence of serial runs and may lead to business logic exceptions or resource competition ### What you expected to happen In the scenario where the rerun interface is serially executed and schedule_time is unique, only one process_instance record can be created. ### How to reproduce Occasionally occur after the task is run for a while ### 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]
