1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-04 08:06:53 +02:00

instant notification of new volumes added or deleted

This commit is contained in:
Chris Lu 2018-08-24 01:26:56 -07:00
parent 5ccf8e8078
commit 76cbe8bf33
7 changed files with 170 additions and 137 deletions

View file

@ -203,7 +203,6 @@ func (m *Entry) GetAttributes() *FuseAttributes {
} }
type EventNotification struct { type EventNotification struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
OldEntry *Entry `protobuf:"bytes,2,opt,name=old_entry,json=oldEntry" json:"old_entry,omitempty"` OldEntry *Entry `protobuf:"bytes,2,opt,name=old_entry,json=oldEntry" json:"old_entry,omitempty"`
NewEntry *Entry `protobuf:"bytes,3,opt,name=new_entry,json=newEntry" json:"new_entry,omitempty"` NewEntry *Entry `protobuf:"bytes,3,opt,name=new_entry,json=newEntry" json:"new_entry,omitempty"`
} }
@ -213,13 +212,6 @@ func (m *EventNotification) String() string { return proto.CompactTex
func (*EventNotification) ProtoMessage() {} func (*EventNotification) ProtoMessage() {}
func (*EventNotification) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (*EventNotification) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *EventNotification) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *EventNotification) GetOldEntry() *Entry { func (m *EventNotification) GetOldEntry() *Entry {
if m != nil { if m != nil {
return m.OldEntry return m.OldEntry
@ -1122,13 +1114,13 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("filer.proto", fileDescriptor0) } func init() { proto.RegisterFile("filer.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1154 bytes of a gzipped FileDescriptorProto // 1152 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0x46, 0x1f, 0x8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x9c, 0xd1, 0x37, 0x46, 0x2c, 0xc6, 0x6c, 0x77, 0x92, 0xa5, 0x22, 0x25, 0xab, 0x6a, 0x33, 0x9c, 0x9c, 0xd1, 0x37,
0x70, 0xff, 0x38, 0x4d, 0x2f, 0xf2, 0xc9, 0x21, 0xcb, 0x30, 0x14, 0x69, 0x76, 0x7d, 0x94, 0x88, 0x70, 0xff, 0x38, 0x4d, 0x2f, 0xf2, 0xc9, 0x21, 0xcb, 0x30, 0x14, 0x69, 0x76, 0x7d, 0x94, 0x88,
0xec, 0xda, 0xc7, 0x5f, 0x72, 0xe4, 0x82, 0x6c, 0x82, 0x1b, 0x15, 0x0a, 0xcf, 0x19, 0x38, 0xdb, 0xec, 0xda, 0xc7, 0x5f, 0x72, 0xe4, 0x82, 0x6c, 0x82, 0x1b, 0x15, 0x0a, 0xcf, 0x19, 0x38, 0xdb,
@ -1144,56 +1136,55 @@ var fileDescriptor0 = []byte{
0x9d, 0x59, 0x9d, 0xc9, 0x43, 0xe8, 0x32, 0x3e, 0x9c, 0x15, 0xa3, 0xa1, 0xf2, 0xeb, 0x30, 0x3e, 0x9d, 0x59, 0x9d, 0xc9, 0x43, 0xe8, 0x32, 0x3e, 0x9c, 0x15, 0xa3, 0xa1, 0xf2, 0xeb, 0x30, 0x3e,
0xad, 0x3b, 0xf9, 0x1c, 0xda, 0xe1, 0xcf, 0x79, 0x72, 0xc1, 0xbd, 0xa6, 0x0a, 0xd5, 0x9b, 0x85, 0xad, 0x3b, 0xf9, 0x1c, 0xda, 0xe1, 0xcf, 0x79, 0x72, 0xc1, 0xbd, 0xa6, 0x0a, 0xd5, 0x9b, 0x85,
0x92, 0x60, 0x0f, 0xa4, 0xce, 0x37, 0x26, 0xe4, 0x29, 0x40, 0x20, 0x44, 0xc6, 0xce, 0x72, 0x81, 0x92, 0x60, 0x0f, 0xa4, 0xce, 0x37, 0x26, 0xe4, 0x29, 0x40, 0x20, 0x44, 0xc6, 0xce, 0x72, 0x81,
0x5c, 0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x6f, 0x55, 0x66, 0xb6, 0xbd, 0xd5, 0x71, 0xe0, 0x12, 0x95, 0x37, 0x8b, 0xce, 0x6c, 0x6f, 0x55, 0x66, 0xb6, 0xbd, 0xd5, 0x71, 0xe0, 0x12, 0x79, 0x03,
0x79, 0x03, 0x5d, 0x9b, 0x5b, 0x88, 0x75, 0xa0, 0x86, 0x1c, 0xfb, 0x0f, 0x16, 0xa9, 0x6d, 0x87, 0x5d, 0x9b, 0x5b, 0x88, 0x75, 0xa0, 0x86, 0x1c, 0xfb, 0x0f, 0x16, 0xa9, 0x6d, 0x87, 0xf6, 0x28,
0xf6, 0x28, 0xd9, 0x0e, 0x6b, 0xc8, 0xc4, 0x76, 0x58, 0x37, 0x81, 0x74, 0x89, 0xfc, 0x04, 0xb7, 0xd9, 0x0e, 0x6b, 0xc8, 0xc4, 0x76, 0x58, 0x37, 0x81, 0x74, 0x89, 0xfc, 0x04, 0xb7, 0xe7, 0x5b,
0xe7, 0x5b, 0x9a, 0x3c, 0x9c, 0x87, 0x55, 0x99, 0x94, 0x3e, 0xbd, 0xc9, 0xa4, 0x70, 0x7e, 0xd6, 0x9a, 0x3c, 0x9c, 0x87, 0x55, 0x99, 0x94, 0x3e, 0xbd, 0xc9, 0xa4, 0x70, 0x7e, 0xd6, 0x56, 0x3f,
0x56, 0x7f, 0x56, 0x5f, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x41, 0x0a, 0x10, 0x9d, 0x68, 0x0d, 0x51, 0x5f, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x81, 0x71, 0x63, 0x3e, 0x53, 0x0d, 0x00, 0x00,
0x00, 0x00,
} }

View file

@ -49,6 +49,9 @@ type Heartbeat struct {
Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"` Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"` AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"` Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
// delta volume ids
NewVids []uint32 `protobuf:"varint,10,rep,packed,name=new_vids,json=newVids" json:"new_vids,omitempty"`
DeletedVids []uint32 `protobuf:"varint,11,rep,packed,name=deleted_vids,json=deletedVids" json:"deleted_vids,omitempty"`
} }
func (m *Heartbeat) Reset() { *m = Heartbeat{} } func (m *Heartbeat) Reset() { *m = Heartbeat{} }
@ -119,6 +122,20 @@ func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
return nil return nil
} }
func (m *Heartbeat) GetNewVids() []uint32 {
if m != nil {
return m.NewVids
}
return nil
}
func (m *Heartbeat) GetDeletedVids() []uint32 {
if m != nil {
return m.DeletedVids
}
return nil
}
type HeartbeatResponse struct { type HeartbeatResponse struct {
VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"` VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"`
SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"` SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"`
@ -536,50 +553,51 @@ var _Seaweed_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) } func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 708 bytes of a gzipped FileDescriptorProto // 726 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x54, 0x41, 0x6f, 0xf3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09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6, 0xf8, 0xa3, 0x24, 0xf8, 0x2e, 0x20, 0x77, 0x30, 0xbe, 0x46, 0xac, 0x16, 0xa5, 0x94, 0x98, 0x4e, 0xc1, 0x9b, 0xa1, 0x48, 0x1f, 0xd7, 0xd5, 0x6f, 0x6b, 0xec, 0xae, 0xd0, 0xfd, 0x83, 0xe7,
0x1b, 0x64, 0xe4, 0x6c, 0xaf, 0xe8, 0x0d, 0x71, 0x4e, 0x8e, 0xff, 0xb3, 0xe7, 0xad, 0x22, 0xfe, 0xd0, 0x66, 0xda, 0x82, 0x5f, 0x42, 0xe7, 0x85, 0x43, 0x2e, 0xc1, 0x3b, 0x43, 0x2c, 0xa6, 0xb9,
0x8b, 0xab, 0xbe, 0x7b, 0x1c, 0xbf, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x83, 0xd9, 0x6b, 0x10, 0x98, 0x68, 0x4c, 0xc9, 0xe1, 0x5a, 0xd2, 0x33, 0xe4, 0xec, 0xef, 0x3d, 0xd9, 0x12, 0x0d,
0x2d, 0x05, 0x00, 0x00, 0x23, 0xd5, 0x8d, 0xf3, 0xae, 0x5d, 0xad, 0x2f, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x97, 0xbc,
0x58, 0x26, 0x6b, 0x05, 0x00, 0x00,
} }

View file

@ -23,6 +23,9 @@ message Heartbeat {
string rack = 7; string rack = 7;
uint32 admin_port = 8; uint32 admin_port = 8;
repeated VolumeInformationMessage volumes = 9; repeated VolumeInformationMessage volumes = 9;
// delta volume ids
repeated uint32 new_vids = 10;
repeated uint32 deleted_vids = 11;
} }
message HeartbeatResponse { message HeartbeatResponse {

View file

@ -72,17 +72,24 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
} }
} }
newVolumes, deletedVolumes := t.SyncDataNodeRegistration(heartbeat.Volumes, dn)
message := &master_pb.VolumeLocation{ message := &master_pb.VolumeLocation{
Url: dn.Url(), Url: dn.Url(),
PublicUrl: dn.PublicUrl, PublicUrl: dn.PublicUrl,
} }
for _, v := range newVolumes { if len(heartbeat.NewVids) > 0 || len(heartbeat.DeletedVids) > 0 {
message.NewVids = append(message.NewVids, uint32(v.Id)) // process delta volume ids if exists for fast volume id updates
} message.NewVids = append(message.NewVids, heartbeat.NewVids...)
for _, v := range deletedVolumes { message.DeletedVids = append(message.DeletedVids, heartbeat.DeletedVids...)
message.DeletedVids = append(message.DeletedVids, uint32(v.Id)) } else {
// process heartbeat.Volumes
newVolumes, deletedVolumes := t.SyncDataNodeRegistration(heartbeat.Volumes, dn)
for _, v := range newVolumes {
message.NewVids = append(message.NewVids, uint32(v.Id))
}
for _, v := range deletedVolumes {
message.DeletedVids = append(message.DeletedVids, uint32(v.Id))
}
} }
if len(message.NewVids) > 0 || len(message.DeletedVids) > 0 { if len(message.NewVids) > 0 || len(message.DeletedVids) > 0 {
@ -169,6 +176,7 @@ func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServ
select { select {
case message := <-messageChan: case message := <-messageChan:
if err := stream.Send(message); err != nil { if err := stream.Send(message); err != nil {
glog.V(0).Infof("=> client %v: %+v", clientName, message)
return err return err
} }
case <-stopChan: case <-stopChan:

View file

@ -89,6 +89,22 @@ func (vs *VolumeServer) doHeartbeat(masterNode string, sleepInterval time.Durati
for { for {
select { select {
case vid := <-vs.store.NewVolumeIdChan:
deltaBeat := &master_pb.Heartbeat{
NewVids: []uint32{uint32(vid)},
}
if err = stream.Send(deltaBeat); err != nil {
glog.V(0).Infof("Volume Server Failed to update to master %s: %v", masterNode, err)
return "", err
}
case vid := <-vs.store.DeletedVolumeIdChan:
deltaBeat := &master_pb.Heartbeat{
DeletedVids: []uint32{uint32(vid)},
}
if err = stream.Send(deltaBeat); err != nil {
glog.V(0).Infof("Volume Server Failed to update to master %s: %v", masterNode, err)
return "", err
}
case <-tickChan: case <-tickChan:
if err = stream.Send(vs.store.CollectHeartbeat()); err != nil { if err = stream.Send(vs.store.CollectHeartbeat()); err != nil {
glog.V(0).Infof("Volume Server Failed to talk with master %s: %v", masterNode, err) glog.V(0).Infof("Volume Server Failed to talk with master %s: %v", masterNode, err)

View file

@ -18,16 +18,18 @@ const (
* A VolumeServer contains one Store * A VolumeServer contains one Store
*/ */
type Store struct { type Store struct {
Ip string Ip string
Port int Port int
PublicUrl string PublicUrl string
Locations []*DiskLocation Locations []*DiskLocation
dataCenter string //optional informaton, overwriting master setting if exists dataCenter string //optional informaton, overwriting master setting if exists
rack string //optional information, overwriting master setting if exists rack string //optional information, overwriting master setting if exists
connected bool connected bool
VolumeSizeLimit uint64 //read from the master VolumeSizeLimit uint64 //read from the master
Client master_pb.Seaweed_SendHeartbeatClient Client master_pb.Seaweed_SendHeartbeatClient
NeedleMapType NeedleMapType NeedleMapType NeedleMapType
NewVolumeIdChan chan VolumeId
DeletedVolumeIdChan chan VolumeId
} }
func (s *Store) String() (str string) { func (s *Store) String() (str string) {
@ -43,6 +45,8 @@ func NewStore(port int, ip, publicUrl string, dirnames []string, maxVolumeCounts
location.loadExistingVolumes(needleMapKind) location.loadExistingVolumes(needleMapKind)
s.Locations = append(s.Locations, location) s.Locations = append(s.Locations, location)
} }
s.NewVolumeIdChan = make(chan VolumeId, 3)
s.DeletedVolumeIdChan = make(chan VolumeId, 3)
return return
} }
func (s *Store) AddVolume(volumeListString string, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64) error { func (s *Store) AddVolume(volumeListString string, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64) error {
@ -87,6 +91,7 @@ func (s *Store) DeleteCollection(collection string) (e error) {
if e != nil { if e != nil {
return return
} }
// let the heartbeat send the list of volumes, instead of sending the deleted volume ids to DeletedVolumeIdChan
} }
return return
} }
@ -119,6 +124,7 @@ func (s *Store) addVolume(vid VolumeId, collection string, needleMapKind NeedleM
location.Directory, vid, collection, replicaPlacement, ttl) location.Directory, vid, collection, replicaPlacement, ttl)
if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate); err == nil { if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate); err == nil {
location.SetVolume(vid, volume) location.SetVolume(vid, volume)
s.NewVolumeIdChan <- vid
return nil return nil
} else { } else {
return err return err
@ -232,14 +238,6 @@ func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) {
return return
} }
func (s *Store) updateMaster() {
if s.Client != nil {
if e := s.Client.Send(s.CollectHeartbeat()); e != nil {
glog.V(0).Infoln("error when reporting size:", e)
}
}
}
func (s *Store) Delete(i VolumeId, n *Needle) (uint32, error) { func (s *Store) Delete(i VolumeId, n *Needle) (uint32, error) {
if v := s.findVolume(i); v != nil && !v.readOnly { if v := s.findVolume(i); v != nil && !v.readOnly {
return v.deleteNeedle(n) return v.deleteNeedle(n)
@ -265,7 +263,7 @@ func (s *Store) HasVolume(i VolumeId) bool {
func (s *Store) MountVolume(i VolumeId) error { func (s *Store) MountVolume(i VolumeId) error {
for _, location := range s.Locations { for _, location := range s.Locations {
if found := location.LoadVolume(i, s.NeedleMapType); found == true { if found := location.LoadVolume(i, s.NeedleMapType); found == true {
s.updateMaster() s.NewVolumeIdChan <- VolumeId(i)
return nil return nil
} }
} }
@ -276,7 +274,7 @@ func (s *Store) MountVolume(i VolumeId) error {
func (s *Store) UnmountVolume(i VolumeId) error { func (s *Store) UnmountVolume(i VolumeId) error {
for _, location := range s.Locations { for _, location := range s.Locations {
if err := location.UnloadVolume(i); err == nil { if err := location.UnloadVolume(i); err == nil {
s.updateMaster() s.DeletedVolumeIdChan <- VolumeId(i)
return nil return nil
} }
} }
@ -287,7 +285,7 @@ func (s *Store) UnmountVolume(i VolumeId) error {
func (s *Store) DeleteVolume(i VolumeId) error { func (s *Store) DeleteVolume(i VolumeId) error {
for _, location := range s.Locations { for _, location := range s.Locations {
if error := location.deleteVolumeById(i); error == nil { if error := location.deleteVolumeById(i); error == nil {
s.updateMaster() s.DeletedVolumeIdChan <- VolumeId(i)
return nil return nil
} }
} }

View file

@ -67,7 +67,6 @@ func (mc *MasterClient) tryAllMasters() {
glog.V(0).Infof("failed to receive from %s: %v", master, err) glog.V(0).Infof("failed to receive from %s: %v", master, err)
return err return err
} else { } else {
glog.V(0).Infof("volume location: %+v", volumeLocation)
loc := Location{ loc := Location{
Url: volumeLocation.Url, Url: volumeLocation.Url,
PublicUrl: volumeLocation.PublicUrl, PublicUrl: volumeLocation.PublicUrl,