From 6cd54ec35c66f02941abefe2bd2d82511de1ebf8 Mon Sep 17 00:00:00 2001 From: wenyekui Date: Fri, 15 Aug 2014 11:32:26 +0800 Subject: [PATCH 1/4] bug fix: encode bitmap meta key --- ledis/t_bit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledis/t_bit.go b/ledis/t_bit.go index 37b788d..bc208a0 100644 --- a/ledis/t_bit.go +++ b/ledis/t_bit.go @@ -121,7 +121,7 @@ func (db *DB) bEncodeMetaKey(key []byte) []byte { mk[0] = db.index mk[1] = BitMetaType - copy(mk, key) + copy(mk[2:], key) return mk } From f2a574f7433562e3acd3611782b7e078f9a0fb4d Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 25 Sep 2014 16:35:29 -0700 Subject: [PATCH 2/4] fix typo --- cmd/ledis-cli/linenoise.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ledis-cli/linenoise.go b/cmd/ledis-cli/linenoise.go index 9919572..4bb49af 100644 --- a/cmd/ledis-cli/linenoise.go +++ b/cmd/ledis-cli/linenoise.go @@ -21,7 +21,7 @@ func line(prompt string) (string, error) { defer C.free(unsafe.Pointer(resultCString)) if resultCString == nil { - return "", errors.New("quited by a signal") + return "", errors.New("exiting due to signal") } result := C.GoString(resultCString) From 11ba94f4ab3076268202ec8c02a5c1fc81a93032 Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 27 Nov 2014 20:48:55 +0800 Subject: [PATCH 3/4] fix issue #112 --- rpl/file_store.go | 7 ++++--- server/snapshot.go | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpl/file_store.go b/rpl/file_store.go index 161ab8d..5f4c324 100644 --- a/rpl/file_store.go +++ b/rpl/file_store.go @@ -196,14 +196,15 @@ func (s *FileStore) storeLog(l *Log) error { func (s *FileStore) PurgeExpired(n int64) error { s.rm.Lock() - purges := []*tableReader{} + var purges []*tableReader t := uint32(time.Now().Unix() - int64(n)) for i, r := range s.rs { if r.lastTime > t { - purges = s.rs[0:i] - s.rs = s.rs[i:] + purges = append([]*tableReader{}, s.rs[0:i]...) + n := copy(s.rs, s.rs[i:]) + s.rs = s.rs[0:n] break } } diff --git a/server/snapshot.go b/server/snapshot.go index 67192ea..b238545 100644 --- a/server/snapshot.go +++ b/server/snapshot.go @@ -137,8 +137,7 @@ func (s *snapshotStore) purge(create bool) { } if num > 0 { - names = s.names[0:num] - + names = append([]string{}, s.names[0:num]...) n := copy(s.names, s.names[num:]) s.names = s.names[0:n] } From db7aaf10af649c180038dffdc1eeef2520f77525 Mon Sep 17 00:00:00 2001 From: zhibinr Date: Thu, 12 Mar 2015 18:50:22 +0800 Subject: [PATCH 4/4] fix a typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35558a3..0c72952 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ LedisDB now supports multiple different databases as backends. + Rich data structure: KV, List, Hash, ZSet, Set. + Data storage is not limited by RAM. + Various backends supported: LevelDB, goleveldb, LMDB, RocksDB, BoltDB, RAM. -+ Supports transactions using LMDB or BotlDB. ++ Supports transactions using LMDB or BoltDB. + Supports Lua scripting. + Supports expiration and TTL. + Can be managed via redis-cli.