You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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 <[email protected]>
Change-Id: I2b4687cc3b5fc767150fa0de607890a68fd38449
0 commit comments