diff options
| author | joeslay <54322500+joeslay@users.noreply.github.com> | 2019-10-14 16:03:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-14 16:03:40 +0100 |
| commit | d53aee179b6624b981caa7e702425ec260808be9 (patch) | |
| tree | 0e641a775fe2ba398283282b9f9a109986e41f58 /weed/storage/volume_loading.go | |
| parent | baa813ee3012d52a4b861cb61a2ef87f94e5b127 (diff) | |
| parent | 50e885da45a58180eeb0098e5446d252181964fc (diff) | |
| download | seaweedfs-d53aee179b6624b981caa7e702425ec260808be9.tar.xz seaweedfs-d53aee179b6624b981caa7e702425ec260808be9.zip | |
Merge pull request #10 from chrislusf/master
merge seaweed master
Diffstat (limited to 'weed/storage/volume_loading.go')
| -rw-r--r-- | weed/storage/volume_loading.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index db168a134..0f2a19bd1 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -59,6 +59,9 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind if alreadyHasSuperBlock { e = v.readSuperBlock() } else { + if !v.SuperBlock.Initialized() { + return fmt.Errorf("volume %s.dat not initialized", fileName) + } e = v.maybeWriteSuperBlock() } if e == nil && alsoLoadIndex { |
