-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-2759] DeliveryService peer<->OS high availability
In previous commits, I added a delivery client: https://gerrit.hyperledger.org/r/#/c/7343 and a connection producer: https://gerrit.hyperledger.org/r/#/c/7337 In this commit, I integrate the two into the existing delivery service, and: - Decouple the blocks request action from the blocks provider and instead- put it into requester.go, which is used by the delivery client (client.go) in the following way- the client has a function that is invoked upon each successful (re)connection to the ordering service. This function utilizes the BlockRequester (requester.go) and makes it send a seekInfo message to the ordering service. - Instead of the BlocksDeliverer to be created once at startup- we have the broadcastClient (client.go) from a previous change set that implements the BlocksDeliverer, and it does reconnection logic upon demand and the delivery service is oblivious of this. This change set makes the delivery service automatically failover/reconnect to backup ordering service endpoints once it disconnects from the ordering service. I added the following test cases: - Peer reconnect upon restart of the ordering service - Peer failover to other ordering service node - Peer is disconnected from ordering service upon close of the delivery service Total code coverage of deliveryclient.go went up to 97% Signed-off-by: Yacov Manevich <yacovm@il.ibm.com> Change-Id: I2b4687cc3b5fc767150fa0de607890a68fd38449
- Loading branch information
Showing
9 changed files
with
530 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.