Guo Lei
5b905fb2b7
Lazy loading ( #3958 )
* types packages is imported more than onece
* lazy-loading
* fix bugs
* fix bugs
* fix unit tests
* fix test error
* rename function
* unload ldb after initial startup
* Don't load ldb when starting volume server if ldbtimeout is set.
* remove uncessary unloadldb
* Update weed/command/server.go
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
* Update weed/command/volume.go
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: guol-fnst <goul-fnst@fujitsu.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
2 years ago
Ryan Russell
0fc242b084
docs: `panicing` -> `panicking` ( #3687 )
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2 years ago
chrislu
26dbc6c905
move to https://github.com/seaweedfs/seaweedfs
2 years ago
justin
3551ca2fcf
enhancement: replace sort.Slice with slices.SortFunc to reduce reflection
3 years ago
chrislu
28b395bef4
better control for reader caching
3 years ago
chrislu
3ad5fa6f6f
chunk cache adds function ReadChunkAt
3 years ago
Eng Zer Jun
b92df1654c
test: use `T.TempDir` to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
3 years ago
Chris Lu
8965a53c4d
add warning error
3 years ago
Eng Zer Jun
a23bcbb7ec
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil . This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
3 years ago
Chris Lu
556cc3a4ca
mount: avoid exception if disk cache is not initialized
related to https://github.com/chrislusf/seaweedfs/issues/2102
4 years ago
Nathan Hawkins
042de9359c
make reader_at handle random reads more efficiently for FUSE
4 years ago
Chris Lu
6bc09b18c4
truncate is a bit faster to reuse the storage
4 years ago
Chris Lu
4abb511db3
make a local copy of the in memory cached data
4 years ago
bingoohuang
ee7cdf3668
revert ErrXyz to ErrorXyz temporarily.
4 years ago
bingoohuang
a6d421508a
revert ErrXyz to ErrorXyz temporarily.
4 years ago
bingoohuang
7ffe736d20
renaming to ErrXyz
4 years ago
bingoohuang
7256902fb0
fix typo offset.ToAcutalOffset to offset.ToActualOffset
4 years ago
Chris Lu
90b117acf1
update ccache version
4 years ago
Chris Lu
707936f482
re-enable caching larger than 16MB
revert 62ce85610e
4 years ago
Chris Lu
b9887504e8
fix test
4 years ago
Chris Lu
f46eae284e
adjust for test
4 years ago
Chris Lu
c49e2bb9a3
adjust
4 years ago
Chris Lu
62ce85610e
skip caching too large chunks
4 years ago
Chris Lu
9ad2dcca2b
more tests
4 years ago
Chris Lu
e43d86c796
fix pre allocated volume size
4 years ago
Chris Lu
31fc7bb2e1
refactor
adjust for faster test
4 years ago
Chris Lu
a41588279a
change log level 5 to 4
4 years ago
Chris Lu
99d05f758c
adjust logs
4 years ago
Chris Lu
6a92f0bc7a
refactoring to typed Size
Go is amazing with refactoring!
4 years ago
Chris Lu
09e126bae5
refactoring: use interface
4 years ago
Chris Lu
be4d42b8e2
rename
4 years ago
Chris Lu
97e54a80d4
rename variables
4 years ago
Chris Lu
003d48da21
adjust logs
4 years ago
Chris Lu
bef356ce4c
since we already know the chunk size, no need to iterate
5 years ago
Chris Lu
a808b3b5df
incase the memory data is too small
5 years ago
Chris Lu
3dbd51c3c2
a little bit more efficient
5 years ago
Chris Lu
212b6e7d42
error logging
5 years ago
Chris Lu
3cec4b3c49
FUSE mount: fix file id written twice?
fix https://github.com/chrislusf/seaweedfs/issues/1373
5 years ago
Chris Lu
cb3985be70
go fmt
5 years ago
Chris Lu
2b5c4fbbf3
tiered caching
1/4 for small less than 1MB files. 1/4 for 1~4MB files, 1/2 for bigger than 4MB files
5 years ago
Chris Lu
f282ed444b
refactoring
5 years ago
Chris Lu
7764e0465c
refactoring
5 years ago
Chris Lu
94e35cdb35
mount: fix
fix bug found by git bisect, but I do not understand why it can cause error!
5 years ago
Chris Lu
2a1f396df5
avoid duplicated setting chunks into cache
5 years ago
Chris Lu
b9b7da905e
handle nil chunk cache
5 years ago
Chris Lu
df97da25f9
mount: add on disk caching
5 years ago
Chris Lu
d7f3acb2c0
refactor
5 years ago