Skip to content

Commit

Permalink
find and fix error
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Partanskiy <pfi79@mail.ru>
  • Loading branch information
pfi79 committed Jan 8, 2024
1 parent 16856f9 commit 8f1281e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/raft/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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{
Expand Down
7 changes: 7 additions & 0 deletions orderer/common/follower/follower_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -291,14 +293,17 @@ 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")
}()

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) {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 8f1281e

Please sign in to comment.