mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserverpb: make alarm memberId uint64
To be consistent with Cluster API
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user