gnoi icon indicating copy to clipboard operation
gnoi copied to clipboard

factory_reset service and concurrent calls to `Start` RPC

Open hellt opened this issue 3 years ago • 0 comments

Hi all, I would like to discuss what is the right way for a target to handle concurrent Start RPC calls in the scope of a Factory Reset service?

Consider the following call flow

T0 (client) StartReq → (target)

T1 (target) StartResp:Success → (client)

-- target prepares the reset--

T5 (client) StartReq → (target)

T6 (target) ??? → (client)

At time T5 a client sends another StartRequest to the target; the target is already in the process of handling a previous StartRequest, but not yet in a shutdown state, so it receives the request. Should it respond with another StartResponse:Success and meaning that the reset is going to happen, or should it send back an gRPC error with a description that explains that another reset request has already been requested?

/cc @samribeiro

hellt avatar Aug 04 '22 07:08 hellt