diff options
| author | guol-fnst <goul-fnst@fujitsu.com> | 2022-05-16 10:41:18 +0800 |
|---|---|---|
| committer | guol-fnst <goul-fnst@fujitsu.com> | 2022-05-16 19:33:51 +0800 |
| commit | de6aa9cce81cb2214e7b7f3dd1a3c9383d054779 (patch) | |
| tree | 0451da338c468cc8565c5ec433070a6879e99efe /weed/server/volume_server.go | |
| parent | 8f103ae613fb4752e7ec41394e155e8ad4c06826 (diff) | |
| download | seaweedfs-de6aa9cce81cb2214e7b7f3dd1a3c9383d054779.tar.xz seaweedfs-de6aa9cce81cb2214e7b7f3dd1a3c9383d054779.zip | |
avoid duplicated volume directory
Diffstat (limited to 'weed/server/volume_server.go')
| -rw-r--r-- | weed/server/volume_server.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index dcd27673c..f927dbdb8 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -1,11 +1,13 @@ package weed_server import ( + "net/http" + "os" + "sync" + "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "github.com/chrislusf/seaweedfs/weed/storage/types" - "net/http" - "sync" "google.golang.org/grpc" @@ -43,6 +45,7 @@ type VolumeServer struct { fileSizeLimitBytes int64 isHeartbeating bool stopChan chan bool + pid int } func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, @@ -86,6 +89,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, inFlightDownloadDataLimitCond: sync.NewCond(new(sync.Mutex)), concurrentUploadLimit: concurrentUploadLimit, concurrentDownloadLimit: concurrentDownloadLimit, + pid: os.Getpid(), } vs.SeedMasterNodes = masterNodes |
