We can use the strategy mode to call the task processing method, and the list of executable tasks can be obtained using optimistic locking. In the microservice architecture, generally a single service is scheduled with multiple copies on different servers. , which can ensure the stability and robustness of the system. However, a problem will arise at this time. When multiple service copies are scheduled to obtain the task list, the same task may be obtained repeatedly, which will lead to repeated execution of the task. In order to circumvent this problem, an optimistic locking mechanism is introduced.
正在翻译中..