Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFT Block Puller: reset total sleep #4402

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

tock-ibm
Copy link
Contributor

Type of change

  • Bug fix

Description

In internal/pkg/peer/blocksprovider/deliverer.go:150

Local variable totalDuration measures the total sleep during retries. If it exceeds reconnectTotalTimeThreshold the Deliverer may exit if MaxRetryDurationExceededHandler returns true.

However, it does not reset on success (block reception), so DeliverBlocks() may exit eventually if the cumulative sleep time is large, but no consecutive reconnect failure sequence exceeds the threshold for stopping retries.

The solution is to reset totalDuration together when we reset failureCounter.

Related issues

Issue: #4394

yacovm
yacovm previously approved these changes Nov 15, 2023
@yacovm yacovm enabled auto-merge (squash) November 15, 2023 15:50
When a block arrives, reset the total sleep time.

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: I340cd3f6026f68e31af72410f5f42790d8d429d9
@yacovm yacovm merged commit 0fe4b3c into hyperledger:main Nov 20, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants