aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-08-19 00:42:02 -0700
committerChris Lu <chris.lu@gmail.com>2020-08-19 00:42:02 -0700
commita78772d5ea235e55ef515d1de28c2201ee9a5d66 (patch)
tree3974af2c3105241ca3c502854011dd3d4cac9ee8
parentae9bc4a50800504115d55f68bfaeb489b9a0e2d8 (diff)
downloadseaweedfs-a78772d5ea235e55ef515d1de28c2201ee9a5d66.tar.xz
seaweedfs-a78772d5ea235e55ef515d1de28c2201ee9a5d66.zip
avoid shutdown in the middle of running
-rw-r--r--weed/filesys/wfs.go3
-rw-r--r--weed/server/webdav_server.go4
2 files changed, 0 insertions, 7 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index e8e619c4a..f147d7548 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -88,9 +88,6 @@ func NewSeaweedFileSystem(option *Option) *WFS {
if option.CacheSizeMB > 0 {
os.MkdirAll(cacheDir, 0755)
wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, cacheDir, option.CacheSizeMB)
- grace.OnInterrupt(func() {
- wfs.chunkCache.Shutdown()
- })
}
wfs.metaCache = meta_cache.NewMetaCache(path.Join(cacheDir, "meta"))
diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go
index fb13f55d0..3d2629c19 100644
--- a/weed/server/webdav_server.go
+++ b/weed/server/webdav_server.go
@@ -10,7 +10,6 @@ import (
"strings"
"time"
- "github.com/chrislusf/seaweedfs/weed/util/grace"
"golang.org/x/net/webdav"
"google.golang.org/grpc"
@@ -101,9 +100,6 @@ type WebDavFile struct {
func NewWebDavFileSystem(option *WebDavOption) (webdav.FileSystem, error) {
chunkCache := chunk_cache.NewTieredChunkCache(256, option.CacheDir, option.CacheSizeMB)
- grace.OnInterrupt(func() {
- chunkCache.Shutdown()
- })
return &WebDavFileSystem{
option: option,
chunkCache: chunkCache,