Do not silence parallel links if there are no stable links #1793
Labels
[core]
Area: Changes in SRT library core
Priority: High
Type: Maintenance
Work required to maintain or clean up the code
Milestone
At the moment having the main link fresh activated triggers silencing previously active link before the stability of the fresh-activated link is confirmed.
TODO: Do not silence parallel links if a link selected to become main is still in the activation phase.
Note the activation phase and its purpose is extended a bit in #1775.
Main/Backup Sending Algorithm
1. Qualify Member States
Before sending a packet, all member links are qualified into the following categories:
Here the runtime stability threshold is used together with the last response time.
2. Sending the Same Packet over Active Links
The same packet is sent over all links qualified as active (including unstable).
Output: a list of parallel links, which is a not-unstable (stable or fresh activated) link with a successful send result.
If sending fails, the link is added to the list of unstable links, but the state of the link itself remains the same.
TODO: Check if Fresh-Activated link should be considered as a parallel link.
3. Add a Packet Being Sent to the Group SND Buffer
This buffer can later be used to retransmit a packet over a newly activated backup link.
4. Check if Backup Link Activation is Needed
Activation is needed if:
5. [IF] Activate Idle Link
Take the first idle link with the highest weight. Send all buffered packets (see step 3) over this link.. If sending failed, move the link to the list of broken, take another idle link and repeat.
If sending succeeded, the activation is done. The link is added to the list of parallel links (should it?).
6. Check Pending and Broken Sockets
Check if there are pending sockets that failed to connect, and should be removed from the group. Check if there are broken sockets to be removed from the group.
7. Wait for Sending Success
In case of a blocking operation mode, if all sending on previous steps has failed, but there are active links, retry within the sending timeout.
8. Silence Redundant Parallel Links
This step is only performed If there are more than 1 parallel links.
Among the list of parallel links find the one with the highest weight. In case of equal weights, find the one not in activation phase or oldest in activation phase if there are two of such (maybe impossible situation).
The text was updated successfully, but these errors were encountered: