volume: return error if superblock is not initialized
fix https://github.com/chrislusf/seaweedfs/issues/1079
This commit is contained in:
@@ -69,6 +69,10 @@ func (s *SuperBlock) Bytes() []byte {
|
||||
return header
|
||||
}
|
||||
|
||||
func (s *SuperBlock) Initialized() bool {
|
||||
return s.ReplicaPlacement == nil || s.Ttl == nil
|
||||
}
|
||||
|
||||
func (v *Volume) maybeWriteSuperBlock() error {
|
||||
stat, e := v.dataFile.Stat()
|
||||
if e != nil {
|
||||
|
||||
Reference in New Issue
Block a user