{"record":{"id":"d54701acb2ade613","repo":"hyperledger/fabric","slug":"already-at-target-height-of-d","errorCode":null,"errorMessage":"already at target height of %d","messagePattern":"already at target height of (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"info","filePath":"orderer/consensus/smartbft/synchronizer_bft.go","lineNumber":97,"sourceCode":"\n// Buffer return the internal SyncBuffer for testability.\nfunc (s *BFTSynchronizer) Buffer() *SyncBuffer {\n\ts.mutex.Lock()\n\tdefer s.mutex.Unlock()\n\n\treturn s.syncBuff\n}\n\nfunc (s *BFTSynchronizer) synchronize() (*types.Decision, error) {\n\t// === We probe all the endpoints and establish a target height, as well as detect the self endpoint.\n\ttargetHeight, myEndpoint, err := s.detectTargetHeight()\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot get detect target height\")\n\t}\n\n\tstartHeight := s.Support.Height()\n\tif startHeight >= targetHeight {\n\t\treturn nil, errors.Errorf(\"already at target height of %d\", targetHeight)\n\t}\n\n\t// === Create a buffer to accept the blocks delivered from the BFTDeliverer.\n\tcapacityBlocks := max(uint(s.LocalConfigCluster.ReplicationBufferSize)/uint(s.Support.SharedConfig().BatchSize().AbsoluteMaxBytes), 100)\n\ts.mutex.Lock()\n\ts.syncBuff = NewSyncBuffer(capacityBlocks)\n\ts.mutex.Unlock()\n\n\t// === Create the BFT block deliverer and start a go-routine that fetches block and inserts them into the syncBuffer.\n\tbftDeliverer, err := s.createBFTDeliverer(startHeight, myEndpoint)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"cannot create BFT block deliverer\")\n\t}\n\n\tgo bftDeliverer.DeliverBlocks()\n\tdefer bftDeliverer.Stop()\n\n\t// === Loop on sync-buffer and pull blocks, writing them to the ledger, returning the last block pulled.","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/synchronizer_bft.go#L79-L115","documentation":"Raised in BFTSynchronizer.synchronize when the local ledger height (startHeight) already meets or exceeds the target height computed from remote peers. As with the raft-style synchronizer, this indicates the node needs no replication; Sync then falls back to returning state from the local ledger. It is a normal, benign outcome rather than a fault.","triggerScenarios":"synchronize() runs, detectTargetHeight succeeds (after deleting this node's own endpoint from the height map), and startHeight := s.Support.Height() >= targetHeight — i.e. remote reachable peers are not ahead of this node.","commonSituations":"Caught-up orderer during routine Sync calls; remaining reachable peers lag behind this node (most cluster offline); node previously restored from a newer backup; transiently probing only slow peers.","solutions":["If the node's ledger is actually current, this is expected — no action needed","Verify the cluster is healthy and a quorum of up-to-date orderers is reachable","If most peers are lagging, restart/repair them so targetHeight reflects the real cluster height","If the node is wrongly ahead (restored snapshot), follow operator procedures to realign the ledger with the cluster"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// Skip sync when remote max height <= local height\nif maxRemoteHeight(probe(consenters)) <= support.Height() {\n    // already caught up; no sync needed\n}","typeGuard":null,"tryCatchPattern":"resp := bftSynchronizer.Sync()\n// 'already at target height' is benign: verify final height matches expectation\nif resp.Latest.Height >= support.Height()-1 {\n    // healthy; sync correctly reported nothing to do\n}","preventionTips":["Treat as info-level, expected behavior on caught-up nodes","Keep a quorum of current peers online so probes reflect real cluster height","Verify backup-restore procedures never leave a node ahead of the live cluster","Track local vs cluster heights in dashboards"],"tags":["consensus","smartbft","fabric","ledger"],"backgroundTag":"already-caught-up","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}