|
@ -4,7 +4,6 @@ import ( |
|
|
"bytes" |
|
|
"bytes" |
|
|
"context" |
|
|
"context" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/syndtr/goleveldb/leveldb/opt" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/filer2" |
|
|
"github.com/chrislusf/seaweedfs/weed/filer2" |
|
|
"github.com/chrislusf/seaweedfs/weed/glog" |
|
|
"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) |
|
|
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) |
|
|
glog.Infof("filer store open dir %s: %v", dir, err) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|