Alex Cano
05/11/2020, 2:17 PMSubmitted
by the Agent. After this, from what I can tell each flow handles the transition from Submitted
to Running
by means of the CloudFlowRunner
, so each CloudFlowRunner
is calling the set_flow_run_states
with its own flow run, right? So maybe the conditions below don’t matter?
First is since the server is written using async, if we put the concurrency check in the api.states.set_flow_run_state
call, and an API call comes in with N flow runs that are trying to transition into a Running
state and there’s M concurrency slots where M < N, how can we guarantee only M flows will transition into the Running
state?
Second, when we’re creating the “Run Queue” in the api.runs.get_runs_in_queue
, we’re specifically returning flow runs in the order of first scheduled. Related to the above, if we’re submitting flow runs to a Running
state, are we guaranteeing that state changes in the flow runs submitted in the set_flow_runs_states
mutation are occurring in order? If there are 3 flow runs and only one concurrency slot, are we just guaranteeing that one of the flow runs in the payload will succeed? Or are we guaranteeing that the first flow run in the payload will succeed?Jeremiah
05/11/2020, 2:35 PMAlex Cano
05/11/2020, 2:38 PMJeremiah
05/11/2020, 2:38 PM