From 8f1281ed58cdf5f094a9170640b720a405b49074 Mon Sep 17 00:00:00 2001 From: Fedor Partanskiy Date: Mon, 8 Jan 2024 17:55:46 +0300 Subject: [PATCH] find and fix error Signed-off-by: Fedor Partanskiy --- integration/raft/config_test.go | 4 ++-- orderer/common/follower/follower_chain.go | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/integration/raft/config_test.go b/integration/raft/config_test.go index fe66e4459a7..1d9bc27e505 100644 --- a/integration/raft/config_test.go +++ b/integration/raft/config_test.go @@ -1128,7 +1128,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Launching the orderers") for _, o := range orderers { - runner := network.OrdererRunner(o, "FABRIC_LOGGING_SPEC=orderer.consensus.etcdraft=debug:info") + runner := network.OrdererRunner(o, "FABRIC_LOGGING_SPEC=orderer.consensus.etcdraft=debug:debug") ordererRunners = append(ordererRunners, runner) process := ifrit.Invoke(runner) ordererProcesses = append(ordererProcesses, process) @@ -1261,7 +1261,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { o2 := network.Orderer("orderer2") o3 := network.Orderer("orderer3") - By("Waiting for them to elect a leader") + By("Waiting for them to select a leader") FindLeader(ordererRunners) assertBlockReception(map[string]int{ diff --git a/orderer/common/follower/follower_chain.go b/orderer/common/follower/follower_chain.go index 1138191e666..285ed2f0cf0 100644 --- a/orderer/common/follower/follower_chain.go +++ b/orderer/common/follower/follower_chain.go @@ -225,7 +225,9 @@ func (c *Chain) Start() { // Halt signals the Chain to stop and waits for the internal go-routine to exit. func (c *Chain) Halt() { c.halt() + c.logger.Info("PFI03") <-c.doneChan + c.logger.Info("PFI04") } func (c *Chain) halt() { @@ -291,6 +293,7 @@ func (c *Chain) run() { c.logger.Debug("The follower.Chain puller goroutine is starting") defer func() { + c.logger.Info("PFI12") close(c.doneChan) c.logger.Debug("The follower.Chain puller goroutine is exiting") }() @@ -298,7 +301,9 @@ func (c *Chain) run() { if err := c.pull(); err != nil { c.logger.Warnf("Pull failed, follower chain stopped, error: %s", err) // TODO set the status to StatusError (see FAB-18106) + c.logger.Info("PFI10") } + c.logger.Info("PFI11") } func (c *Chain) increaseRetryInterval(retryInterval *time.Duration, upperLimit time.Duration) { @@ -354,7 +359,9 @@ func (c *Chain) pull() error { // Trigger creation of a new consensus.Chain. c.logger.Info("Block pulling finished successfully, going to switch from follower to a consensus.Chain") c.halt() + c.logger.Info("PFI01") c.chainCreator.SwitchFollowerToChain(c.ledgerResources.ChannelID()) + c.logger.Info("PFI02") return nil }