mirror of https://gitee.com/bigwinds/arangodb
parent
7fe65115a3
commit
cb34760f40
|
@ -102,7 +102,7 @@ bool RocksDBAllIndexIterator::nextDocument(
|
|||
IndexIterator::DocumentCallback const& cb, size_t limit) {
|
||||
TRI_ASSERT(_trx->state()->isRunning());
|
||||
|
||||
if (limit == 0 || !_iterator->Valid()) {
|
||||
if (limit == 0 || !_iterator->Valid() || outOfRange()) {
|
||||
// No limit no data, or we are actually done. The last call should have
|
||||
// returned false
|
||||
TRI_ASSERT(limit > 0); // Someone called with limit == 0. Api broken
|
||||
|
@ -115,7 +115,7 @@ bool RocksDBAllIndexIterator::nextDocument(
|
|||
--limit;
|
||||
_iterator->Next();
|
||||
|
||||
if (!_iterator->Valid()) {
|
||||
if (!_iterator->Valid() || outOfRange()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue