etcdserverpb: make alarm memberId uint64

To be consistent with Cluster API
This commit is contained in:
Anthony Romano
2016-03-29 19:22:40 -07:00
parent 2deed74494
commit 96ee00a322
4 changed files with 5 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ func (qa *quotaAlarmer) check(ctx context.Context, r interface{}) error {
return nil
}
req := &pb.AlarmRequest{
MemberID: int64(qa.id),
MemberID: uint64(qa.id),
Action: pb.AlarmRequest_ACTIVATE,
Alarm: pb.AlarmType_NOSPACE,
}

View File

@@ -1205,7 +1205,7 @@ func (m *DefragmentResponse) GetHeader() *ResponseHeader {
type AlarmRequest struct {
Action AlarmRequest_AlarmAction `protobuf:"varint,1,opt,name=action,proto3,enum=etcdserverpb.AlarmRequest_AlarmAction" json:"action,omitempty"`
// MemberID is the member raising the alarm request
MemberID int64 `protobuf:"varint,2,opt,name=memberID,proto3" json:"memberID,omitempty"`
MemberID uint64 `protobuf:"varint,2,opt,name=memberID,proto3" json:"memberID,omitempty"`
Alarm AlarmType `protobuf:"varint,3,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"`
}
@@ -10085,7 +10085,7 @@ func (m *AlarmRequest) Unmarshal(data []byte) error {
}
b := data[iNdEx]
iNdEx++
m.MemberID |= (int64(b) & 0x7F) << shift
m.MemberID |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}

View File

@@ -453,7 +453,7 @@ message AlarmRequest {
}
AlarmAction action = 1;
// MemberID is the member raising the alarm request
int64 memberID = 2;
uint64 memberID = 2;
AlarmType alarm = 3;
}

View File

@@ -1028,7 +1028,7 @@ func (s *EtcdServer) apply(es []raftpb.Entry, confState *raftpb.ConfState) (uint
plog.Errorf("applying raft message exceeded backend quota")
go func() {
a := &pb.AlarmRequest{
MemberID: int64(s.ID()),
MemberID: uint64(s.ID()),
Action: pb.AlarmRequest_ACTIVATE,
Alarm: pb.AlarmType_NOSPACE,
}