forked from mirror/ledisdb
use origin syndtr goleveldb
This commit is contained in:
parent
98ddc8b47a
commit
9fc027e553
|
@ -55,8 +55,12 @@
|
|||
"Rev": "ecf49fc0738105e87d20e29aa82c403b666ff0b4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/siddontang/goleveldb/leveldb",
|
||||
"Rev": "41805642b981fb3d9462f6641bcb94b8609ca791"
|
||||
"ImportPath": "github.com/syndtr/goleveldb/leveldb",
|
||||
"Rev": "c9e0ae706141dc099005d6d247e4880c7feda2e1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/syndtr/gosnappy/snappy",
|
||||
"Rev": "ce8acff4829e0c2458a67ead32390ac0a381c862"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/szferi/gomdb",
|
||||
|
|
|
@ -17,8 +17,8 @@ go get -u github.com/boltdb/bolt
|
|||
go get -u github.com/ugorji/go/codec
|
||||
go get -u github.com/BurntSushi/toml
|
||||
go get -u github.com/edsrzf/mmap-go
|
||||
go get -u github.com/syndtr/goleveldb/leveldb
|
||||
|
||||
go get -u github.com/siddontang/goleveldb/leveldb
|
||||
go get -u github.com/siddontang/go/bson
|
||||
go get -u github.com/siddontang/go/log
|
||||
go get -u github.com/siddontang/go/snappy
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package driver
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
type BatchPuter interface {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package goleveldb
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
type WriteBatch struct {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package goleveldb
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/siddontang/goleveldb/leveldb/cache"
|
||||
"github.com/siddontang/goleveldb/leveldb/filter"
|
||||
"github.com/siddontang/goleveldb/leveldb/opt"
|
||||
"github.com/siddontang/goleveldb/leveldb/storage"
|
||||
"github.com/siddontang/goleveldb/leveldb/util"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb/cache"
|
||||
"github.com/syndtr/goleveldb/leveldb/filter"
|
||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||
"github.com/syndtr/goleveldb/leveldb/storage"
|
||||
"github.com/syndtr/goleveldb/leveldb/util"
|
||||
|
||||
"github.com/siddontang/ledisdb/config"
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
|
@ -126,6 +126,12 @@ func newOptions(cfg *config.LevelDBConfig) *opt.Options {
|
|||
|
||||
opts.BlockSize = cfg.BlockSize
|
||||
opts.WriteBuffer = cfg.WriteBufferSize
|
||||
opts.CachedOpenFiles = cfg.MaxOpenFiles
|
||||
|
||||
//here we use default value, later add config support
|
||||
opts.CompactionTableSize = 32 * 1024 * 1024
|
||||
opts.WriteL0SlowdownTrigger = 16
|
||||
opts.WriteL0PauseTrigger = 64
|
||||
|
||||
return opts
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package goleveldb
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb/iterator"
|
||||
"github.com/syndtr/goleveldb/leveldb/iterator"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package goleveldb
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
type Snapshot struct {
|
||||
|
|
|
@ -8,7 +8,7 @@ package leveldb
|
|||
import "C"
|
||||
|
||||
import (
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package store
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"github.com/siddontang/goleveldb/leveldb"
|
||||
"github.com/siddontang/ledisdb/store/driver"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue