Skip to content

Commit

Permalink
rename RestSize to ReservedSize
Browse files Browse the repository at this point in the history
Signed-off-by: awzhgw <[email protected]>
  • Loading branch information
awzhgw committed Jun 20, 2019
1 parent 236e454 commit f018e4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions datanode/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,19 @@ func (s *DataNode) startSpaceManager(cfg *config.Config) (err error) {
if !fileInfo.IsDir() {
return ErrBadConfFile
}
restSize, err := strconv.ParseUint(arr[1], 10, 64)
reservedSpace, err := strconv.ParseUint(arr[1], 10, 64)
if err != nil {
return ErrBadConfFile
}

if restSize < DefaultDiskRetain {
restSize = DefaultDiskRetain
if reservedSpace < DefaultDiskRetain {
reservedSpace = DefaultDiskRetain
}
wg.Add(1)
go func(wg *sync.WaitGroup, path string, restSize uint64) {
go func(wg *sync.WaitGroup, path string, reservedSpace uint64) {
defer wg.Done()
s.space.LoadDisk(path, restSize, DefaultDiskMaxErr)
}(&wg, path, restSize)
s.space.LoadDisk(path, reservedSpace, DefaultDiskMaxErr)
}(&wg, path, reservedSpace)
}
wg.Wait()
return nil
Expand Down

0 comments on commit f018e4b

Please sign in to comment.