这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Mar 30, 2018. It is now read-only.

Conversation

@muralisrini
Copy link
Contributor

Allow a keep alive messages between fabric and chaincode. Default is no-keepalive.

Description

It is possible that an inactive gRPC connection between the chaincode and the peer can get broken by a intermediate proxy. Introduced a "keepalive" parameter (in seconds) which can be used to send ChaincodeMessage of type KEEPALIVE between the peer and chaincode. A chaincode just echoes the KEEPALIVE message received from the peer.

Motivation and Context

Keeps the connection between peer and chaincode going with application protocol level messages. This makes the connection liveness non dependent upon lower layer keepalive mechanisms.

Fixes #1850

How Has This Been Tested?

Enabled all chaincode tests (except one for covering no keep-alive scenario) to use an aggressive keepalive timer of 1 second.

Checklist:

  • I have added a Signed-off-by.
  • I have either added documentation to cover my changes or this change requires no new documentation.
  • I have either added unit tests to cover my changes or this change requires no new tests.
  • I have run golint and have fixed valid warnings in code I have added or modified. This tool generates false positives so you may choose to ignore some warnings. The goal is clean, consistent, and readable code.

The continuous integration build process will run make checks to confirm that tests pass and that code quality meets minimum standards. You may optionally run this locally as PRs will not be accepted until they pass.

Signed-off-by:muralisr@us.ibm.com

@dco-bot
Copy link

dco-bot commented Jun 22, 2016

Hi muralisrini,

Thanks for submitting this pull request!

Please add a comment with a DCO1.1 Signed-off-by statement in order to allow us to process your pull request.

dco-bot

peer/core.yaml Outdated
#keepalive in seconds. In situations where the communiction goes through a
#proxy that does not support keep-alive, this parameter will maintain connection
#between peer and chaincode.
#A value <= 0 turns keepalive off
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a space after the # characters so it is consistent with the other comments in core.yaml?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do.

@srderson
Copy link
Contributor

Thanks, LGTM

@srderson srderson merged commit 1ec4606 into hyperledger-archives:master Jun 23, 2016
lhaskins pushed a commit to lhaskins/fabric-archive that referenced this pull request Oct 14, 2016
…incode_ping2#issue1850

Add chaincode ping2#issue1850
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Connection times out between chaincode & peer when running behind a proxy

3 participants