TANK
TANK copied to clipboard
Implement inflight requests tracking for timeouts
track_inflight_req(), consider_inflight_reqs() and forget_inflight_req() implementation is pending.
We need to implement them so that we can deal with requests where the response takes too long, e.g if you just stop the broker with a STOP signal. We can use a binary heap, or a skip-list, or even a vector, although ideally we 'd like both reg/dereg to be an O(1) operation, so maybe we can extend the use of outgoing_payload, by adding a switch_dlist to it (for its request) and then walk that list in consider_inflight_reqs(), and inserting/removing in track_inflight_req() and forget_inflight_req(). We should also back this by a Switch::unordered_map<> so that we can quickly identify the payload in forget_inflight_req().
We should use EBTs, now that we already use them on TANK/service.