don't require oldNode in SetCoordinator()

This commit is contained in:
Travis Turner 2018-02-02 15:51:24 -06:00
parent 216ba7a41e
commit 86dbbbf393
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
6 changed files with 93 additions and 162 deletions

View file

@ -297,22 +297,16 @@ func (c *Cluster) IsCoordinator() bool {
return c.Static || c.Coordinator == c.Node.URI
}
// SetCoordinator updates the Coordinator to new if it is
// currently old. Returns true if the Coordinator changed.
func (c *Cluster) SetCoordinator(o, n *Node) bool {
// Get old node.
oldNode := c.nodeByID(o.ID)
if oldNode == nil {
return false
}
// SetCoordinator updates the Coordinator to n.
// Returns true if the Coordinator changed.
func (c *Cluster) SetCoordinator(n *Node) bool {
// Get new node.
newNode := c.nodeByID(n.ID)
if newNode == nil {
return false
}
if c.Coordinator == oldNode.URI && oldNode != newNode {
if c.Coordinator != newNode.URI {
c.Coordinator = newNode.URI
return true
}

View file

@ -517,14 +517,14 @@ func TestCluster_SetCoordinator(t *testing.T) {
newNode := c.Nodes[1]
// Set coordinator to the same value.
if set := c.SetCoordinator(oldNode, oldNode); set {
if c.SetCoordinator(oldNode) {
t.Errorf("did not expect coordinator to change")
} else if c.Coordinator != oldNode.URI {
t.Errorf("expected coordinator: %s, but got: %s", c.Coordinator, oldNode.URI)
}
// Set coordinator to a new value.
if set := c.SetCoordinator(oldNode, newNode); !set {
if !c.SetCoordinator(newNode) {
t.Errorf("expected coordinator to change")
} else if c.Coordinator != newNode.URI {
t.Errorf("expected coordinator: %s, but got: %s", c.Coordinator, newNode.URI)

View file

@ -1964,11 +1964,6 @@ func (h *Handler) handlePostClusterResizeSetCoordinator(w http.ResponseWriter, r
return
}
oldNode := h.Cluster.nodeByURI(h.Cluster.Coordinator)
if oldNode == nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
newNode := h.Cluster.nodeByID(req.ID)
if newNode == nil {
http.Error(w, err.Error(), http.StatusBadRequest)
@ -1979,7 +1974,6 @@ func (h *Handler) handlePostClusterResizeSetCoordinator(w http.ResponseWriter, r
// Send the set-coordinator message to all nodes.
err := h.Broadcaster.SendSync(
&internal.SetCoordinatorMessage{
Old: EncodeNode(oldNode),
New: EncodeNode(newNode),
})
if err != nil {
@ -1987,7 +1981,7 @@ func (h *Handler) handlePostClusterResizeSetCoordinator(w http.ResponseWriter, r
}
// Set Coordinator on local node.
_ = h.Cluster.SetCoordinator(oldNode, newNode)
_ = h.Cluster.SetCoordinator(newNode)
return nil
}(); err != nil {
@ -1997,7 +1991,6 @@ func (h *Handler) handlePostClusterResizeSetCoordinator(w http.ResponseWriter, r
// Encode response.
if err := json.NewEncoder(w).Encode(setCoordinatorResponse{
Old: oldNode,
New: newNode,
}); err != nil {
h.logger().Printf("response encoding error: %s", err)

View file

@ -1029,8 +1029,7 @@ func (m *ResizeInstructionComplete) GetError() string {
}
type SetCoordinatorMessage struct {
Old *Node `protobuf:"bytes,1,opt,name=Old" json:"Old,omitempty"`
New *Node `protobuf:"bytes,2,opt,name=New" json:"New,omitempty"`
New *Node `protobuf:"bytes,1,opt,name=New" json:"New,omitempty"`
}
func (m *SetCoordinatorMessage) Reset() { *m = SetCoordinatorMessage{} }
@ -1038,13 +1037,6 @@ func (m *SetCoordinatorMessage) String() string { return proto.Compac
func (*SetCoordinatorMessage) ProtoMessage() {}
func (*SetCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{31} }
func (m *SetCoordinatorMessage) GetOld() *Node {
if m != nil {
return m.Old
}
return nil
}
func (m *SetCoordinatorMessage) GetNew() *Node {
if m != nil {
return m.New
@ -2405,26 +2397,16 @@ func (m *SetCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.Old != nil {
if m.New != nil {
dAtA[i] = 0xa
i++
i = encodeVarintPrivate(dAtA, i, uint64(m.Old.Size()))
n21, err := m.Old.MarshalTo(dAtA[i:])
i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size()))
n21, err := m.New.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n21
}
if m.New != nil {
dAtA[i] = 0x12
i++
i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size()))
n22, err := m.New.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n22
}
return i, nil
}
@ -3065,10 +3047,6 @@ func (m *ResizeInstructionComplete) Size() (n int) {
func (m *SetCoordinatorMessage) Size() (n int) {
var l int
_ = l
if m.Old != nil {
l = m.Old.Size()
n += 1 + l + sovPrivate(uint64(l))
}
if m.New != nil {
l = m.New.Size()
n += 1 + l + sovPrivate(uint64(l))
@ -7524,39 +7502,6 @@ func (m *SetCoordinatorMessage) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Old", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPrivate
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthPrivate
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Old == nil {
m.Old = &Node{}
}
if err := m.Old.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field New", wireType)
}
@ -7826,84 +7771,84 @@ var (
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
var fileDescriptorPrivate = []byte{
// 1258 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5b, 0x6f, 0x1b, 0x45,
0x14, 0x66, 0xbd, 0xb6, 0x63, 0x1f, 0xd7, 0xa9, 0x33, 0xb4, 0xc1, 0xad, 0x22, 0xd7, 0x8c, 0x10,
0x0d, 0x95, 0x88, 0x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 0xd7, 0x73, 0xd3, 0x88, 0x48, 0x46, 0xce, 0x71, 0x73, 0x29, 0x48, 0x01, 0x27,
0xe2, 0x84, 0xc3, 0xa5, 0xa6, 0x5a, 0x00, 0x1b, 0x66, 0x92, 0x4c, 0x30, 0x59, 0x7e, 0x26, 0x3f,
0x00, 0x48, 0x4d, 0xf5, 0x71, 0x5f, 0xd2, 0x9f, 0x19, 0x63, 0xfa, 0x08, 0x36, 0xcc, 0x98, 0xbb,
0xc4, 0x82, 0xa6, 0x5b, 0x72, 0x69, 0xb7, 0xd0, 0x0e, 0xd8, 0x4f, 0x99, 0x83, 0x57, 0x9d, 0x3c,
0xad, 0xa6, 0x44, 0x5a, 0x42, 0x97, 0x47, 0x41, 0x14, 0x1b, 0x17, 0xfc, 0x46, 0xec, 0x49, 0x10,
0xc6, 0x92, 0x71, 0x95, 0xc9, 0x6f, 0xfa, 0x1e, 0xe4, 0xf7, 0x83, 0xbe, 0x20, 0xab, 0x90, 0x73,
0xda, 0x3a, 0x46, 0xce, 0x69, 0x93, 0x5b, 0x32, 0xbc, 0x9e, 0x21, 0xd5, 0x74, 0x73, 0x4f, 0x99,
0xc3, 0x50, 0x43, 0x1f, 0x40, 0x0d, 0x1d, 0xbb, 0x31, 0x8f, 0x93, 0x11, 0xb6, 0x0e, 0x45, 0xc4,
0x92, 0x40, 0x5a, 0x92, 0x17, 0x02, 0xda, 0x99, 0x21, 0x26, 0x05, 0xfa, 0xa3, 0x05, 0x60, 0x42,
0x8c, 0x22, 0x42, 0x15, 0x13, 0xe9, 0x5a, 0x69, 0xad, 0xa6, 0x4b, 0x22, 0xca, 0x14, 0xcb, 0x77,
0x32, 0xd7, 0xf0, 0xec, 0x7c, 0x4b, 0x54, 0x2c, 0x73, 0x59, 0x6f, 0x9a, 0x71, 0xa6, 0x0b, 0x55,
0x4b, 0xed, 0x15, 0xae, 0x53, 0x86, 0x37, 0x40, 0x75, 0xd7, 0x1b, 0x45, 0xb1, 0x08, 0x35, 0x23,
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64, 0x9e, 0x6c, 0xf4, 0x18, 0x6e, 0xcc, 0x94,
0x69, 0x37, 0x18, 0x0c, 0xb1, 0x1f, 0xfe, 0x43, 0xb9, 0xae, 0x41, 0xa1, 0x13, 0x86, 0xba, 0x50,
0x65, 0xa6, 0x04, 0xfa, 0x25, 0x5c, 0xef, 0x8a, 0x38, 0x53, 0x24, 0xd3, 0x6d, 0x4d, 0xb0, 0x1f,
0x7b, 0xfd, 0x05, 0xdb, 0x47, 0x15, 0x5a, 0xec, 0x8b, 0xd3, 0x05, 0x6b, 0xa2, 0x8a, 0xee, 0x40,
0xe9, 0x20, 0x18, 0x06, 0x5e, 0x70, 0x34, 0xbe, 0xe0, 0x58, 0xd7, 0x61, 0x45, 0x4d, 0x2d, 0xf5,
0x28, 0x28, 0x33, 0x23, 0xee, 0xd4, 0x7e, 0x3d, 0x6f, 0x58, 0xbf, 0x9d, 0x37, 0xac, 0xdf, 0xcf,
0x1b, 0xd6, 0x4f, 0x7f, 0x34, 0x5e, 0x39, 0x2c, 0xca, 0xff, 0xcf, 0x7b, 0xff, 0x04, 0x00, 0x00,
0xff, 0xff, 0x03, 0x63, 0x93, 0xf4, 0x90, 0x0e, 0x00, 0x00,
// 1250 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5d, 0x6f, 0x1b, 0x45,
0x17, 0x7e, 0xd7, 0xbb, 0x76, 0xec, 0xe3, 0x38, 0x71, 0xe6, 0x4d, 0x83, 0x13, 0x45, 0xae, 0x19,
0x21, 0x1a, 0x2a, 0x11, 0x15, 0x57, 0x02, 0x1a, 0x54, 0xa9, 0x24, 0x76, 0xd5, 0x05, 0x12, 0xca,
0x38, 0x2d, 0x12, 0x17, 0x48, 0x13, 0x7b, 0x48, 0x57, 0x59, 0xef, 0x9a, 0xdd, 0x71, 0x12, 0xf7,
0x82, 0x4b, 0x84, 0x84, 0xb8, 0x47, 0xdc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, 0x24, 0xd3, 0x6d, 0x0d, 0xb0, 0x8f,
0xd8, 0xc5, 0x9c, 0xed, 0x0b, 0x15, 0xde, 0x87, 0xe2, 0x71, 0x38, 0x08, 0xfd, 0xf0, 0x74, 0x74,
0xcd, 0xa1, 0xad, 0xc1, 0x92, 0x9a, 0x49, 0xea, 0xca, 0x2f, 0x11, 0x23, 0xee, 0x57, 0x7f, 0xb9,
0xaa, 0x5b, 0xbf, 0x5e, 0xd5, 0xad, 0xdf, 0xae, 0xea, 0xd6, 0x8f, 0xbf, 0xd7, 0xff, 0x77, 0x52,
0x90, 0x7f, 0x97, 0xf7, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xc5, 0x2e, 0x66, 0x6e, 0x0e,
0x00, 0x00,
}

View file

@ -186,8 +186,7 @@ message ResizeInstructionComplete {
}
message SetCoordinatorMessage {
Node Old = 1;
Node New = 2;
Node New = 1;
}
message Topology {

View file

@ -442,7 +442,7 @@ func (s *Server) ReceiveMessage(pb proto.Message) error {
return err
}
case *internal.SetCoordinatorMessage:
s.Cluster.SetCoordinator(DecodeNode(obj.Old), DecodeNode(obj.New))
s.Cluster.SetCoordinator(DecodeNode(obj.New))
case *internal.NodeStateMessage:
err := s.Cluster.ReceiveNodeState(obj.NodeID, obj.State)
if err != nil {