rename UUID file

fix typo
move locationUUID  into DiskLocation
This commit is contained in:
guol-fnst
2022-05-17 10:19:35 +08:00
committed by guol-fnst
parent de6aa9cce8
commit 8fab39e775
3 changed files with 7 additions and 7 deletions

View File

@@ -41,7 +41,6 @@ type Store struct {
GrpcPort int
PublicUrl string
Locations []*DiskLocation
LocationUUIDs []string
dataCenter string // optional informaton, overwriting master setting if exists
rack string // optional information, overwriting master setting if exists
connected bool
@@ -66,8 +65,6 @@ func NewStore(grpcDialOption grpc.DialOption, ip string, port int, grpcPort int,
location := NewDiskLocation(dirnames[i], maxVolumeCounts[i], minFreeSpaces[i], idxFolder, diskTypes[i])
location.loadExistingVolumes(needleMapKind)
s.Locations = append(s.Locations, location)
dirUUID, _ := GenerateDirUUID(dirnames[i])
s.LocationUUIDs = append(s.LocationUUIDs, dirUUID)
stats.VolumeServerMaxVolumeCounter.Add(float64(maxVolumeCounts[i]))
}
s.NewVolumesChan = make(chan master_pb.VolumeShortInformationMessage, 3)
@@ -305,8 +302,8 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
}
var UUIDList []string
for _, locationUUID := range s.LocationUUIDs {
UUIDList = append(UUIDList, locationUUID)
for _, loc := range s.Locations {
UUIDList = append(UUIDList, loc.DirectoryUUID)
}
for col, size := range collectionVolumeSize {