go fmt
This commit is contained in:
@@ -34,7 +34,7 @@ func (l *DiskLocation) DestroyEcVolume(vid needle.VolumeId) {
|
||||
ecVolume, found := l.ecVolumes[vid]
|
||||
if found {
|
||||
ecVolume.Destroy()
|
||||
delete(l.ecVolumes,vid)
|
||||
delete(l.ecVolumes, vid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ func EcShardFileName(collection string, dir string, id int) (fileName string) {
|
||||
func EcShardBaseFileName(collection string, id int) (baseFileName string) {
|
||||
baseFileName = strconv.Itoa(id)
|
||||
if collection != "" {
|
||||
baseFileName = collection+"_"+baseFileName
|
||||
baseFileName = collection + "_" + baseFileName
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -221,11 +221,11 @@ func (s *Store) cachedLookupEcShardLocations(ctx context.Context, ecVolume *eras
|
||||
|
||||
shardCount := len(ecVolume.ShardLocations)
|
||||
if shardCount < erasure_coding.DataShardsCount &&
|
||||
ecVolume.ShardLocationsRefreshTime.Add(11 * time.Second).After(time.Now()) ||
|
||||
ecVolume.ShardLocationsRefreshTime.Add(11*time.Second).After(time.Now()) ||
|
||||
shardCount == erasure_coding.TotalShardsCount &&
|
||||
ecVolume.ShardLocationsRefreshTime.Add(37 * time.Minute).After(time.Now()) ||
|
||||
ecVolume.ShardLocationsRefreshTime.Add(37*time.Minute).After(time.Now()) ||
|
||||
shardCount >= erasure_coding.DataShardsCount &&
|
||||
ecVolume.ShardLocationsRefreshTime.Add(7 * time.Minute).After(time.Now()) {
|
||||
ecVolume.ShardLocationsRefreshTime.Add(7*time.Minute).After(time.Now()) {
|
||||
// still fresh
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user