Skip to content

Commit

Permalink
kv: fix iterator bug in prev
Browse files Browse the repository at this point in the history
Signed-off-by: Haodong Tang <haodong.tang@intel.com>
  • Loading branch information
haodong committed Aug 12, 2016
1 parent 619736c commit b8551bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kv/MemDB.cc
Expand Up @@ -478,11 +478,12 @@ int MemDB::MDBWholeSpaceIteratorImpl:: prev()
return -1;
}
free_last();
m_iter--;
if (m_iter != m_btree_p->end()) {
if (m_iter != m_btree_p->begin()) {
m_iter--;
fill_current();
return 0;
} else {
m_iter--;
return -1;
}
}
Expand Down

0 comments on commit b8551bd

Please sign in to comment.