mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
endure creating .vif files
This commit is contained in:
parent
0cc8347a3a
commit
9134092a8d
|
@ -26,7 +26,9 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
|
||||||
fileName := v.FileName()
|
fileName := v.FileName()
|
||||||
alreadyHasSuperBlock := false
|
alreadyHasSuperBlock := false
|
||||||
|
|
||||||
v.maybeLoadVolumeInfo()
|
if !v.maybeLoadVolumeInfo() {
|
||||||
|
v.SaveVolumeInfo()
|
||||||
|
}
|
||||||
|
|
||||||
if v.HasRemoteFile() {
|
if v.HasRemoteFile() {
|
||||||
v.noWriteCanDelete = true
|
v.noWriteCanDelete = true
|
||||||
|
|
|
@ -12,9 +12,7 @@ func (v *Volume) GetVolumeInfo() *volume_server_pb.VolumeInfo {
|
||||||
return v.volumeInfo
|
return v.volumeInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Volume) maybeLoadVolumeInfo() {
|
func (v *Volume) maybeLoadVolumeInfo() (found bool){
|
||||||
|
|
||||||
var found bool
|
|
||||||
|
|
||||||
v.volumeInfo, found = pb.MaybeLoadVolumeInfo(v.FileName() + ".vif")
|
v.volumeInfo, found = pb.MaybeLoadVolumeInfo(v.FileName() + ".vif")
|
||||||
|
|
||||||
|
@ -24,6 +22,8 @@ func (v *Volume) maybeLoadVolumeInfo() {
|
||||||
v.hasRemoteFile = true
|
v.hasRemoteFile = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Volume) HasRemoteFile() bool {
|
func (v *Volume) HasRemoteFile() bool {
|
||||||
|
|
Loading…
Reference in a new issue