mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-26 14:45:31 +08:00
fix naming convention
notify volume server of duplicate directoris improve searching efficiency
This commit is contained in:
@@ -118,8 +118,16 @@ func (vs *VolumeServer) doHeartbeat(masterAddress pb.ServerAddress, grpcDialOpti
|
||||
doneChan <- err
|
||||
return
|
||||
}
|
||||
if in.HasDuplicatedDirectory {
|
||||
glog.Error("Shut Down Volume Server due to duplicated volume directory")
|
||||
if len(in.DuplicatedUuids) > 0 {
|
||||
var duplictedDir []string
|
||||
for _, loc := range vs.store.Locations {
|
||||
for _, uuid := range in.DuplicatedUuids {
|
||||
if uuid == loc.DirectoryUuid {
|
||||
duplictedDir = append(duplictedDir, loc.Directory)
|
||||
}
|
||||
}
|
||||
}
|
||||
glog.Errorf("Shut down Volume Server due to duplicated volume directories: %v", duplictedDir)
|
||||
os.Exit(1)
|
||||
}
|
||||
if in.GetVolumeSizeLimit() != 0 && vs.store.GetVolumeSizeLimit() != in.GetVolumeSizeLimit() {
|
||||
|
||||
Reference in New Issue
Block a user