Ethan Buchman
135a1a7cd7
db: sort keys for memdb iterator
2017-11-20 03:06:18 +00:00
Anton Kaliaev
0b22b27bbb
avoid infinite recursion by proxying to iterator
...
```
WARNING: staticcheck, gosimple and unused are all set, using megacheck instead
db/go_level_db.go:126:15⚠️ infinite recursive call (SA5007) (megacheck)
db/go_level_db.go:135:17⚠️ infinite recursive call (SA5007) (megacheck)
db/mem_db.go:106:2⚠️ redundant return statement (S1023) (megacheck)
```
https://circleci.com/gh/tendermint/tmlibs/220
Also remove unnecessary return statement
2017-10-17 11:01:46 +04:00
Anton Kaliaev
cd2ad19db4
Merge pull request #57 from tendermint/feature/improve-db-interface
...
WIP: Improve db interface
2017-10-13 18:31:05 +04:00
Alexis Sellier
6b1e3bcee3
Add comments about copying
2017-10-13 13:03:43 +02:00
Ethan Buchman
7dd6b3d3f8
Merge pull request #53 from tendermint/metalinter
...
add metalinter to CI and address some lint warnings
2017-10-04 00:21:24 -04:00
Alexis Sellier
e9e6ec3a2c
Implement Key/Value on Iterator for GoLevelDB
...
This is needed because leveldb reuses the keys on each iteration.
In our wrapper, we copy the key/value so that it is safe to store.
2017-09-28 17:43:47 +02:00
Alexis Sellier
219d4e8427
Add IteratorPrefix method to Iterator
2017-09-28 17:35:01 +02:00
Alexis Sellier
296d223545
Add Release & Error methods to Iterator
...
We need this to properly support LevelDB backend, which needs
to be released if we don't want to leak memory.
2017-09-28 17:26:24 +02:00
Emmanuel Odeke
8be8127351
db: fix MemDB.Close
...
Fixes https://github.com/tendermint/tmlibs/issues/55
MemDB previously mistakenly set the actual DB pointer to nil
although that side effect is not visible to the outside world
since p is an identifier within the scope of just that function
call. However, @melekes and I had a discussion in which we
came to the conclusion that Close for an in-memory DB should
instead be a noop and not cause any data loss. See the
discussion on https://github.com/tendermint/tmlibs/pull/56 .
2017-09-26 15:29:51 -06:00
Zach Ramsay
3c57c24921
linting: next round of fixes
2017-09-22 12:14:27 -04:00
Ethan Buchman
8f1dea89f5
db: fix memdb iterator
2017-08-25 16:35:37 -04:00
Ethan Buchman
2f8551d3b6
go-common -> tmlibs
2017-04-18 17:56:05 -04:00
Ethan Buchman
900be74e8f
update import paths
2017-04-18 16:33:51 -04:00
Ethan Buchman
fdbb10827d
merge go-db
2017-04-18 16:33:35 -04:00