gnoi
gnoi copied to clipboard
factory_reset service and concurrent calls to `Start` RPC
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