Browse Source
Merge branch 'chrislusf:master' into master
pull/3218/head
famosss
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
3 deletions
-
weed/mount/inode_to_path.go
-
weed/server/raft_hashicorp.go
-
weed/server/raft_server.go
|
@ -176,7 +176,7 @@ func (i *InodeToPath) MovePath(sourcePath, targetPath util.FullPath) (replacedIn |
|
|
entry.nlookup++ |
|
|
entry.nlookup++ |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
glog.Errorf("MovePath %s to %s: sourceInode %s not found", sourcePath, targetPath, sourceInode) |
|
|
|
|
|
|
|
|
glog.Errorf("MovePath %s to %s: sourceInode %d not found", sourcePath, targetPath, sourceInode) |
|
|
} |
|
|
} |
|
|
return targetInode |
|
|
return targetInode |
|
|
} |
|
|
} |
|
|
|
@ -121,7 +121,10 @@ func NewHashicorpRaftServer(option *RaftServerOption) (*RaftServer, error) { |
|
|
if option.RaftBootstrap { |
|
|
if option.RaftBootstrap { |
|
|
os.RemoveAll(path.Join(s.dataDir, ldbFile)) |
|
|
os.RemoveAll(path.Join(s.dataDir, ldbFile)) |
|
|
os.RemoveAll(path.Join(s.dataDir, sdbFile)) |
|
|
os.RemoveAll(path.Join(s.dataDir, sdbFile)) |
|
|
os.RemoveAll(path.Join(s.dataDir, "snapshot")) |
|
|
|
|
|
|
|
|
os.RemoveAll(path.Join(s.dataDir, "snapshots")) |
|
|
|
|
|
} |
|
|
|
|
|
if err := os.MkdirAll(path.Join(s.dataDir, "snapshots"), os.ModePerm); err != nil { |
|
|
|
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
baseDir := s.dataDir |
|
|
baseDir := s.dataDir |
|
|
|
|
|
|
|
|
|
@ -125,7 +125,7 @@ func NewRaftServer(option *RaftServerOption) (*RaftServer, error) { |
|
|
os.RemoveAll(path.Join(s.dataDir, "conf")) |
|
|
os.RemoveAll(path.Join(s.dataDir, "conf")) |
|
|
os.RemoveAll(path.Join(s.dataDir, "snapshot")) |
|
|
os.RemoveAll(path.Join(s.dataDir, "snapshot")) |
|
|
} |
|
|
} |
|
|
if err := os.MkdirAll(path.Join(s.dataDir, "snapshot"), 0700); err != nil { |
|
|
|
|
|
|
|
|
if err := os.MkdirAll(path.Join(s.dataDir, "snapshot"), os.ModePerm); err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|