{"record":{"id":"66e8835834bf1032","repo":"hyperledger/fabric","slug":"empty-membership","errorCode":null,"errorMessage":"Empty membership","messagePattern":"Empty membership","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gossip/privdata/pull.go","lineNumber":256,"sourceCode":"func (p *puller) FetchReconciledItems(dig2collectionConfig privdatacommon.Dig2CollectionConfig) (*privdatacommon.FetchedPvtDataContainer, error) {\n\t// computeFilters returns a map from a digest to a routing filter\n\tdig2Filter, err := p.computeReconciliationFilters(dig2collectionConfig)\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n\treturn p.fetchPrivateData(dig2Filter)\n}\n\nfunc (p *puller) fetchPrivateData(dig2Filter digestToFilterMapping) (*privdatacommon.FetchedPvtDataContainer, error) {\n\t// Get a list of peers per channel\n\tallFilters := dig2Filter.flattenFilterValues()\n\tmembers := p.waitForMembership()\n\tp.logger.Debug(\"Total members in channel:\", members)\n\tmembers = filter.AnyMatch(members, allFilters...)\n\tp.logger.Debug(\"Total members that fit some digest:\", members)\n\tif len(members) == 0 {\n\t\tp.logger.Warning(\"Do not know any peer in the channel(\", p.channel, \") that matches the policies , aborting\")\n\t\treturn nil, errors.New(\"Empty membership\")\n\t}\n\tmembers = randomizeMemberList(members)\n\tres := &privdatacommon.FetchedPvtDataContainer{}\n\t// Distribute requests to peers, and obtain subscriptions for all their messages\n\t// matchDigestToPeer returns a map from a peer to the digests which we would ask it for\n\tvar peer2digests peer2Digests\n\t// We expect all private RWSets represented as digests to be collected\n\titemsLeftToCollect := len(dig2Filter)\n\t// As long as we still have some data to collect and new members to ask the data for:\n\tfor itemsLeftToCollect > 0 && len(members) > 0 {\n\t\tpurgedPvt := p.getPurgedCollections(members, dig2Filter)\n\t\t// Need to remove purged digest from mapping\n\t\tfor _, dig := range purgedPvt {\n\t\t\tres.PurgedElements = append(res.PurgedElements, &protosgossip.PvtDataDigest{\n\t\t\t\tTxId:       dig.TxId,\n\t\t\t\tBlockSeq:   dig.BlockSeq,\n\t\t\t\tSeqInBlock: dig.SeqInBlock,\n\t\t\t\tNamespace:  dig.Namespace,","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/gossip/privdata/pull.go#L238-L274","documentation":"The private data puller fetches missing private data from channel members. After waiting for membership and applying the collection policy filters, if no remaining peer matches any collection policy, there is no one to request data from and fetchPrivateData aborts.","triggerScenarios":"fetch/FetchReconciledItems runs while membership (after AnyMatch with all collection filters) is empty — no peers in the channel view are authorized for any of the missing collections.","commonSituations":"Peer just joined and gossip membership is empty or not converged; this peer is not a member of any collection (filters exclude everyone it knows); all collection members are offline.","solutions":["Start at least one peer belonging to the collection's member orgs and ensure gossip connects this peer to it","Verify this peer's org is included in the collection's member_orgs_policy if it should have access","Wait for gossip membership convergence after channel join and retry reconciliation"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if len(gossip.PeersOfChannel(channel)) == 0 {\n  // defer fetch until membership exists\n}","typeGuard":null,"tryCatchPattern":"res, err := puller.Fetch(retryOpts)\nif err != nil && strings.Contains(err.Error(), \"Empty membership\") {\n  // retry after gossip membership converges\n}","preventionTips":["Configure anchor peers so membership populates","Ensure this peer's org is in the collections' member_orgs_policy"],"tags":["hyperledger-fabric","gossip","private-data","membership"],"backgroundTag":"empty-gossip-membership","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"}