Skip to content

Commit

Permalink
[FAB-18307] IT: set deprioritizedDataReconcilerInterval to prevent CI…
Browse files Browse the repository at this point in the history
… flake (#2070)

Pvtdata reconciliation will fail in case the peer temporarily loses connection
to another peer that provides the pvtdata during IT test. This could cause CI flake.
To prevent the flake, set deprioritizedDataReconcilerInterval to a small value
so that reconciliation can be resumed quickly.

Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
  • Loading branch information
wenjianqiao authored Nov 3, 2020
1 parent 32da54c commit 596f720
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions integration/ledger/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,12 @@ func initAndStartFourOrgsNetwork() *setup {
n.Bootstrap()

// set ReconcileSleepInterval to 1 second to reconcile pvtdata faster
// set DeprioritizedDataReconcilerInterval to 2 seconds to resume reconciliation quickly
// to prevent CI flake in case peer connection is temporarily lost.
for _, p := range n.Peers {
core := n.ReadPeerConfig(p)
core.Peer.Gossip.PvtData.ReconcileSleepInterval = 1 * time.Second
core.Ledger.PvtdataStore.DeprioritizedDataReconcilerInterval = 2 * time.Second
n.WritePeerConfig(p, core)
}

Expand Down
2 changes: 2 additions & 0 deletions integration/nwo/core_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ ledger:
warmIndexesAfterNBlocks: 1
history:
enableHistoryDatabase: true
pvtdataStore:
deprioritizedDataReconcilerInterval: 60m
operations:
listenAddress: 127.0.0.1:{{ .PeerPort Peer "Operations" }}
Expand Down
9 changes: 7 additions & 2 deletions integration/nwo/fabricconfig/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,9 @@ type SystemFlags struct {

type Ledger struct {
// Blockchain - not sure if it's needed
State *StateConfig `yaml:"state,omitempty"`
History *HistoryConfig `yaml:"history,omitempty"`
State *StateConfig `yaml:"state,omitempty"`
History *HistoryConfig `yaml:"history,omitempty"`
PvtdataStore *PvtdataStore `yaml:"pvtdataStore,omitempty"`
}

type StateConfig struct {
Expand All @@ -319,6 +320,10 @@ type HistoryConfig struct {
EnableHistoryDatabase bool `yaml:"enableHistoryDatabase"`
}

type PvtdataStore struct {
DeprioritizedDataReconcilerInterval time.Duration
}

type Operations struct {
ListenAddress string `yaml:"listenAddress,omitempty"`
TLS *TLS `yaml:"tls"`
Expand Down

0 comments on commit 596f720

Please sign in to comment.