diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-04 22:04:10 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-04 22:04:10 -0700 |
| commit | ca8a2bb5345aec1d15bf087d66028292d567de87 (patch) | |
| tree | 2b46d3db145ec40471c1d7ed01314860510406c4 /weed/storage | |
| parent | 2215e81be70e4687b8ef775911e30943cc743a13 (diff) | |
| download | seaweedfs-ca8a2bb5345aec1d15bf087d66028292d567de87.tar.xz seaweedfs-ca8a2bb5345aec1d15bf087d66028292d567de87.zip | |
go fmt
Diffstat (limited to 'weed/storage')
| -rw-r--r-- | weed/storage/disk_location_ec.go | 2 | ||||
| -rw-r--r-- | weed/storage/erasure_coding/ec_shard.go | 2 | ||||
| -rw-r--r-- | weed/storage/store_ec.go | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go index 13797ed4b..7fb5351a4 100644 --- a/weed/storage/disk_location_ec.go +++ b/weed/storage/disk_location_ec.go @@ -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) } } diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go index 7b9f2dc07..2009beb9c 100644 --- a/weed/storage/erasure_coding/ec_shard.go +++ b/weed/storage/erasure_coding/ec_shard.go @@ -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 } diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index 4ac01c4a9..960551dc2 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -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 } |
