Description
Normal flow
1) When participating node completed operation, it sends PARTICIPANT_FINISHED message to coordinator.
2) When coordinator collected responses from all participants, it notifies originator with FINISHED request.
3) Originator responds coordinator with FINISHED_ACK message.
4) Coordinator responds to all peers with PARTICIPANT_FINISHED_ACK message.
Originator leave
1) Coordinator marks originator as "notified", and sends PARTICIPANT_FINISHED_ACK message to participants after all PARTICIPANT_FINISHED are collected.
Participant leave
1) Coordinator marks participant as "finished" and no longer waits for any responses from it.
Coordinator leave
1) The oldest node among remaining participants is elected as new coordinator.
2) Coordinator polls explicitly operation state from participants with IS_PARTICIPANT_FINISHED message.
3) Participants re-send PARTICIPANT_FINISHED message to new coordinator.
4) If all participant nodes have left, originator feature is completed with error.