mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
go fmt
This commit is contained in:
parent
8fbc0a9163
commit
0cc8347a3a
|
@ -12,10 +12,8 @@ import (
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// MaybeLoadVolumeInfo load the file data as *volume_server_pb.VolumeInfo, the returned volumeInfo will not be nil
|
// MaybeLoadVolumeInfo load the file data as *volume_server_pb.VolumeInfo, the returned volumeInfo will not be nil
|
||||||
func MaybeLoadVolumeInfo(fileName string) (*volume_server_pb.VolumeInfo, bool) {
|
func MaybeLoadVolumeInfo(fileName string) (*volume_server_pb.VolumeInfo, bool) {
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ func (vs *VolumeServer) VolumeEcShardsGenerate(ctx context.Context, req *volume_
|
||||||
return nil, fmt.Errorf("WriteEcFiles %s: %v", baseFileName, err)
|
return nil, fmt.Errorf("WriteEcFiles %s: %v", baseFileName, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return &volume_server_pb.VolumeEcShardsGenerateResponse{}, nil
|
return &volume_server_pb.VolumeEcShardsGenerateResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ func (vs *VolumeServer) VolumeTierMoveDatToRemote(req *volume_server_pb.VolumeTi
|
||||||
Offset: 0,
|
Offset: 0,
|
||||||
FileSize: uint64(size),
|
FileSize: uint64(size),
|
||||||
ModifiedTime: uint64(time.Now().Unix()),
|
ModifiedTime: uint64(time.Now().Unix()),
|
||||||
Extension: ".dat",
|
Extension: ".dat",
|
||||||
})
|
})
|
||||||
|
|
||||||
if err := v.SaveVolumeInfo(); err != nil {
|
if err := v.SaveVolumeInfo(); err != nil {
|
||||||
|
|
|
@ -143,4 +143,3 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue