Skip to content

Commit

Permalink
Fixes the go race tests. (#158)
Browse files Browse the repository at this point in the history
We used these iterators with no mutex, back when iterator performance was
one of our main blockers, and this step was thought to be of heavy performance impact.

(It does add a notable delay to iteration steps, but it was later learned
the bulk of the problem was due to IAVL & LevelDB interaction)

Its overdue to have turned this off just for simplicity of tests passing.
We still should update the BTree library and remove the need for this
multiple process terrible hack that exists now, but thats work for the future.
(There is no race condition if you look into the details of whats happening,
the gorace detector is off here!)
  • Loading branch information
ValarDragon authored Mar 27, 2022
1 parent d53f1dd commit bd83477
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/cachekv/memiterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func newMemIterator(start, end []byte, items *dbm.MemDB, deleted map[string]stru
var err error

if ascending {
iter, err = items.IteratorNoMtx(start, end)
iter, err = items.Iterator(start, end)
} else {
iter, err = items.ReverseIteratorNoMtx(start, end)
iter, err = items.ReverseIterator(start, end)
}

if err != nil {
Expand Down

0 comments on commit bd83477

Please sign in to comment.