mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 09:09:24 +08:00
change server address from string to a type
This commit is contained in:
@@ -3,6 +3,7 @@ package erasure_coding
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/volume_info"
|
||||
"math"
|
||||
"os"
|
||||
@@ -30,7 +31,7 @@ type EcVolume struct {
|
||||
ecxFileSize int64
|
||||
ecxCreatedAt time.Time
|
||||
Shards []*EcVolumeShard
|
||||
ShardLocations map[ShardId][]string
|
||||
ShardLocations map[ShardId][]pb.ServerAddress
|
||||
ShardLocationsRefreshTime time.Time
|
||||
ShardLocationsLock sync.RWMutex
|
||||
Version needle.Version
|
||||
@@ -69,7 +70,7 @@ func NewEcVolume(diskType types.DiskType, dir string, dirIdx string, collection
|
||||
volume_info.SaveVolumeInfo(dataBaseFileName+".vif", &volume_server_pb.VolumeInfo{Version: uint32(ev.Version)})
|
||||
}
|
||||
|
||||
ev.ShardLocations = make(map[ShardId][]string)
|
||||
ev.ShardLocations = make(map[ShardId][]pb.ServerAddress)
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user