Skip to content

Commit

Permalink
etcdserver: update Hash to take rev and return hash and compact_revision
Browse files Browse the repository at this point in the history
  • Loading branch information
fanminshi committed Jul 14, 2017
1 parent 2b730a8 commit 5acba2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etcdserver/api/v3rpc/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ func (ms *maintenanceServer) Snapshot(sr *pb.SnapshotRequest, srv pb.Maintenance
}

func (ms *maintenanceServer) Hash(ctx context.Context, r *pb.HashRequest) (*pb.HashResponse, error) {
h, rev, err := ms.kg.KV().Hash()
h, compactRev, err := ms.kg.KV().HashByRev(r.Revision)
if err != nil {
return nil, togRPCError(err)
}
resp := &pb.HashResponse{Header: &pb.ResponseHeader{Revision: rev}, Hash: h}
resp := &pb.HashResponse{Header: &pb.ResponseHeader{}, Hash: h, CompactRevision: compactRev}
ms.hdr.fill(resp.Header)
return resp, nil
}
Expand Down

0 comments on commit 5acba2b

Please sign in to comment.