Skip to content

Commit 8961e4e

Browse files
committed
[FAB-7522] Customize private data push ack timeout
This change set adds a key in core.yaml that customizes the maximum time to wait for an ack when peers are pushing private data at endorsement time. Change-Id: I1c62a7c1d3ad67c7e58b128d3f453b3550c45143 Signed-off-by: yacovm <yacovm@il.ibm.com>
1 parent a63e458 commit 8961e4e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gossip/privdata/distributor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"fmt"
1111
"sync"
1212
"sync/atomic"
13-
"time"
1413

1514
"github.com/hyperledger/fabric/core/common/privdata"
1615
"github.com/hyperledger/fabric/gossip/api"
@@ -23,6 +22,7 @@ import (
2322
proto "github.com/hyperledger/fabric/protos/gossip"
2423
"github.com/hyperledger/fabric/protos/ledger/rwset"
2524
"github.com/pkg/errors"
25+
"github.com/spf13/viper"
2626
)
2727

2828
// gossipAdapter an adapter for API's required from gossip module
@@ -125,7 +125,7 @@ func (d *distributorImpl) disseminationPlanForMsg(colAP privdata.CollectionAcces
125125
}
126126

127127
sc := gossip2.SendCriteria{
128-
Timeout: time.Second,
128+
Timeout: viper.GetDuration("peer.gossip.pvtData.pushAckTimeout"),
129129
Channel: gossipCommon.ChainID(d.chainID),
130130
MaxPeers: colAP.MaximumPeerCount(),
131131
MinAck: colAP.RequiredPeerCount(),

sampleconfig/core.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ peer:
225225
# Private data is purged from the transient store when blocks with sequences that are multiples
226226
# of transientstoreMaxBlockRetention are committed.
227227
transientstoreMaxBlockRetention: 1000
228+
# pushAckTimeout is the maximum time to wait for an acknowledgement from each peer
229+
# at private data push at endorsement time.
230+
pushAckTimeout: 3s
228231

229232
# EventHub related configuration
230233
events:

0 commit comments

Comments
 (0)