Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-15938

Peer out of sync is elected as leader

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Invalid: Works as Expected
    • None
    • None
    • fabric-gossip
    • None
    • (Please add steps to reproduce)

    Description

      If a peer is offline (maintenance, network or hardware issues), it stays behind other peers. When this peer is bring back online, a sync process is automatically started. This part works as expected, but, in some cases this peer is elected as a leader. But because this peer is currently in synchronization, no events/new blocks are emitted until the synchronization process is complete.

      In our particular case, this synchronization may take couple of hours, and our implementations and integrations relay completely on Fabric events. 

      Probably peers out of sync must not participate in leader election, until they are synchronized. 

      We are using official Fabric images at version amd64-1.4.1

      Here is part of the logs (domain names are masked with xxx):

      2019-07-12 06:03:52.033 UTC [gossip.channel] reportMembershipChanges -> INFO 033 Membership view has changed. peers went online: [[peer0.xxx.xxx:7051]] , current view: [[peer0.xxx.xxx:7051]]
      2019-07-12 06:03:52.486 UTC [gossip.state] queueNewMessage -> WARN 034 Block [1227654231] received from gossip wasn't added to payload buffer: Ledger height is at 1208654231, cannot enqueue block with sequence of 1227654231
      2019-07-12 06:03:53.275 UTC [gossip.election] beLeader -> INFO 035 03b4026405d8d9f372458b912b59f89c3a5967c8b295876cb390434d49a078fc : Becoming a leader
      2019-07-12 06:03:53.275 UTC [gossip.service] func1 -> INFO 036 Elected as a leader, starting delivery service for channel pbch
      2019-07-12 06:03:53.894 UTC [gossip.privdata] StoreBlock -> INFO 037 [pbch] Received block [1208654231] from buffer
      2019-07-12 06:03:53.896 UTC [committer.txvalidator] Validate -> INFO 038 [pbch] Validated block [1208654231] in 2ms
      2019-07-12 06:03:54.053 UTC [kvledger] CommitWithPvtData -> INFO 039 [pbch] Committed block [1208654231] with 1 transaction(s) in 157ms (state_validation=0ms block_commit=114ms state_commit=21ms)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gatakka Ivan Vankov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: