MCPcopy
hub / github.com/dgraph-io/dgraph / initProposalKey

Function initProposalKey

worker/proposal.go:104–112  ·  view source on GitHub ↗

{2 bytes Node ID} {4 bytes for random} {2 bytes zero}

(id uint64)

Source from the content-addressed store, hash-verified

102
103// {2 bytes Node ID} {4 bytes for random} {2 bytes zero}
104func initProposalKey(id uint64) error {
105 x.AssertTrue(id != 0)
106 var err error
107 proposalKey, err = x.ProposalKey(groups().Node.Id)
108 if err != nil {
109 return err
110 }
111 return nil
112}
113
114// uniqueKey is meant to be unique across all the replicas.
115// initProposalKey should be called before calling uniqueKey.

Callers 1

InitAndStartNodeMethod · 0.85

Calls 3

AssertTrueFunction · 0.92
ProposalKeyFunction · 0.92
groupsFunction · 0.85

Tested by

no test coverage detected