aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfamosss <13281440@qq.com>2022-06-22 09:58:56 +0800
committerGitHub <noreply@github.com>2022-06-22 09:58:56 +0800
commit8a6e7a7df868f2dda7daa8a3f1671fbe9dae5b85 (patch)
tree6dd179022d247a00e7ce95a19a065732a40b1f2e
parent9df5ad53094958e30a4bf837ae98149d3ea20e1d (diff)
parentd652ce1a36385b573004051c4c685a1aabdc1eb5 (diff)
downloadseaweedfs-8a6e7a7df868f2dda7daa8a3f1671fbe9dae5b85.tar.xz
seaweedfs-8a6e7a7df868f2dda7daa8a3f1671fbe9dae5b85.zip
Merge branch 'chrislusf:master' into master
-rw-r--r--weed/mount/inode_to_path.go2
-rw-r--r--weed/server/raft_hashicorp.go5
-rw-r--r--weed/server/raft_server.go2
3 files changed, 6 insertions, 3 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go
index 64cabfaf5..fa17a9261 100644
--- a/weed/mount/inode_to_path.go
+++ b/weed/mount/inode_to_path.go
@@ -176,7 +176,7 @@ func (i *InodeToPath) MovePath(sourcePath, targetPath util.FullPath) (replacedIn
entry.nlookup++
}
} 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
}
diff --git a/weed/server/raft_hashicorp.go b/weed/server/raft_hashicorp.go
index cc6578bf5..9971eaa48 100644
--- a/weed/server/raft_hashicorp.go
+++ b/weed/server/raft_hashicorp.go
@@ -121,7 +121,10 @@ func NewHashicorpRaftServer(option *RaftServerOption) (*RaftServer, error) {
if option.RaftBootstrap {
os.RemoveAll(path.Join(s.dataDir, ldbFile))
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
diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go
index 8c372f0cc..ad0a1c8ce 100644
--- a/weed/server/raft_server.go
+++ b/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, "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
}