MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / printZeroProposal

Function printZeroProposal

dgraph/cmd/debug/run.go:869–895  ·  view source on GitHub ↗
(buf *bytes.Buffer, zpr *pb.ZeroProposal)

Source from the content-addressed store, hash-verified

867}
868
869func printZeroProposal(buf *bytes.Buffer, zpr *pb.ZeroProposal) {
870 if zpr == nil {
871 return
872 }
873
874 switch {
875 case len(zpr.SnapshotTs) > 0:
876 fmt.Fprintf(buf, " Snapshot: %+v .", zpr.SnapshotTs)
877 case zpr.Member != nil:
878 fmt.Fprintf(buf, " Member: %+v .", zpr.Member)
879 case zpr.Tablet != nil:
880 fmt.Fprintf(buf, " Tablet: %+v .", zpr.Tablet)
881 case zpr.MaxUID > 0:
882 fmt.Fprintf(buf, " MaxUID: %d .", zpr.MaxUID)
883 case zpr.MaxNsID > 0:
884 fmt.Fprintf(buf, " MaxNsID: %d .", zpr.MaxNsID)
885 case zpr.MaxRaftId > 0:
886 fmt.Fprintf(buf, " MaxRaftId: %d .", zpr.MaxRaftId)
887 case zpr.MaxTxnTs > 0:
888 fmt.Fprintf(buf, " MaxTxnTs: %d .", zpr.MaxTxnTs)
889 case zpr.Txn != nil:
890 txn := zpr.Txn
891 fmt.Fprintf(buf, " Txn %d → %d .", txn.StartTs, txn.CommitTs)
892 default:
893 fmt.Fprintf(buf, " Proposal: %+v .", zpr)
894 }
895}
896
897func printSummary(db *badger.DB) {
898 nsFromKey := func(key []byte) uint64 {

Callers 1

printEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected