diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-12-04 22:39:43 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-12-04 22:39:43 -0800 |
| commit | 263eb29e9f6aa7aaa8b6da45244ce75f712f358e (patch) | |
| tree | db9078aa007ead36f00f055efc94cd86209198a7 /weed/server | |
| parent | d171d9f988130eb1517e6d7609dbedbae1fa58bc (diff) | |
| download | seaweedfs-263eb29e9f6aa7aaa8b6da45244ce75f712f358e.tar.xz seaweedfs-263eb29e9f6aa7aaa8b6da45244ce75f712f358e.zip | |
filer: add option to cache small files to filer store
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/filer_server.go | 1 | ||||
| -rw-r--r-- | weed/server/filer_server_handlers_write_autochunk.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index 461c08aad..d04053df5 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -55,6 +55,7 @@ type FilerOption struct { Port uint32 recursiveDelete bool Cipher bool + CacheToFilerLimit int64 Filers []string } diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index 4d8a4d44c..b9f250737 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -236,7 +236,7 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque break } } - if chunkOffset < 2048 { + if chunkOffset < fs.option.CacheToFilerLimit { smallContent = content } return fileChunks, md5Hash, chunkOffset, nil, smallContent |
