feat(executions): add a protection mecanism to avoid any potential concurrency overflow

Concurrency limit is based on a counter that increment and decrement the limit each time a flow is started and terminated.

This count should always be accurate.

But if some unexpected event occurs (bug or user manually do something wrong), the count may not be accurate anymore.

To avoid any potential issue, when we decrement the counter, we chech that concurrency count is bellow the limit before unqueing an execution.

Fixes #12031
Closes  #13301
This commit is contained in:
Loïc Mathieu
2025-12-03 14:54:00 +01:00
parent abdbb8d364
commit 8eae8aba72
6 changed files with 101 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
package io.kestra.runner.postgres;
import io.kestra.core.runners.AbstractRunnerConcurrencyTest;
import io.kestra.jdbc.runner.JdbcConcurrencyRunnerTest;
public class PostgresRunnerConcurrencyTest extends AbstractRunnerConcurrencyTest {
public class PostgresRunnerConcurrencyTest extends JdbcConcurrencyRunnerTest {
}