Skip to content

Fix out of order responses to SendRequest

Responses to SendRequest are sent and thus received in different order of that of execution on the service.

reminder: Flow of SendRequest on service

[rpc] Dispatch(request,eventual)
[rpc] wait on (eventual) response  
[service] run request and set response  (eventual)
[rpc] send response to client

Example of issue:

consider pipeline of proxies 100->101

[client] 100.UpdatePipeline() -> Request1( UpdatePipeline(gid 100)) ->(on arrival)  process data information of 100
[client] 101.UpdatePipeline() -> Request2(UpdatePipeline(gid 101)) ->(on arrival) process data information of 101

[ds] UpdatePipeline1(gid 100) -> produce data information for [100,101] -> populate response_1 -> (signal) rpc
[ds] UpdatePipeline2(gid 101) -> no data since no updates-> empty reponse_2 -> (signal) rpc

[rpc] -> send response_2 << issue
[rpc] -> send response_1
[client] -> receive response_2 -> invalid data info for 100
[client] -> receive response_1 -> valid data info for 100 & 101

In this MR we replace the eventual with a callback to be called by the service once done.

Edited by Christos Tsolakis

Merge request reports

Loading