diff options
| author | Guo Lei <snipergg@163.com> | 2022-11-14 16:19:27 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-14 00:19:27 -0800 |
| commit | 5b905fb2b74049437fcd939c0304a7e34d051234 (patch) | |
| tree | 2c654eb74ee30f5c9e20a6c26de4ede1d04543d9 /weed/util/chunk_cache | |
| parent | d90aa31d5f5b846c13bbeabfbd7d89260c21020c (diff) | |
| download | seaweedfs-5b905fb2b74049437fcd939c0304a7e34d051234.tar.xz seaweedfs-5b905fb2b74049437fcd939c0304a7e34d051234.zip | |
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>
Diffstat (limited to 'weed/util/chunk_cache')
| -rw-r--r-- | weed/util/chunk_cache/chunk_cache_on_disk.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/util/chunk_cache/chunk_cache_on_disk.go b/weed/util/chunk_cache/chunk_cache_on_disk.go index 3fc9cf0b4..3968f62e9 100644 --- a/weed/util/chunk_cache/chunk_cache_on_disk.go +++ b/weed/util/chunk_cache/chunk_cache_on_disk.go @@ -69,7 +69,7 @@ func LoadOrCreateChunkCacheVolume(fileName string, preallocate int64) (*ChunkCac WriteBuffer: 1 * 1024 * 1024, // default value is 4MiB CompactionTableSizeMultiplier: 10, // default value is 1 } - if v.nm, err = storage.NewLevelDbNeedleMap(v.fileName+".ldb", indexFile, opts); err != nil { + if v.nm, err = storage.NewLevelDbNeedleMap(v.fileName+".ldb", indexFile, opts, 0); err != nil { return nil, fmt.Errorf("loading leveldb %s error: %v", v.fileName+".ldb", err) } |
