From 35aba35c07e75ba5849a32e8382e92aafd076765 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 9 Apr 2019 00:22:40 -0700 Subject: [PATCH] Revert "weed volume: disable block cache on leveldb" This reverts commit a55e708d36c31973a7d117f8ef1d4f36cd382801. --- weed/filer2/leveldb/leveldb_store.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/weed/filer2/leveldb/leveldb_store.go b/weed/filer2/leveldb/leveldb_store.go index 06398d48e..5b3a63959 100644 --- a/weed/filer2/leveldb/leveldb_store.go +++ b/weed/filer2/leveldb/leveldb_store.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "fmt" - "github.com/syndtr/goleveldb/leveldb/opt" "github.com/chrislusf/seaweedfs/weed/filer2" "github.com/chrislusf/seaweedfs/weed/glog" @@ -40,9 +39,7 @@ func (store *LevelDBStore) initialize(dir string) (err error) { return fmt.Errorf("Check Level Folder %s Writable: %s", dir, err) } - if store.db, err = leveldb.OpenFile(dir, &opt.Options{ - BlockCacheCapacity: -1, // default value is 8MiB - }); err != nil { + if store.db, err = leveldb.OpenFile(dir, nil); err != nil { glog.Infof("filer store open dir %s: %v", dir, err) return }