Browse Source

Merge branch 'chrislusf:master' into master

pull/3218/head
famosss 3 years ago
committed by GitHub
parent
commit
8a6e7a7df8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      weed/mount/inode_to_path.go
  2. 5
      weed/server/raft_hashicorp.go
  3. 2
      weed/server/raft_server.go

2
weed/mount/inode_to_path.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
} }

5
weed/server/raft_hashicorp.go

@ -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

2
weed/server/raft_server.go

@ -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
} }

Loading…
Cancel
Save