1
0
Fork 0

remove unused code

This commit is contained in:
Jan Christoph Uhde 2017-05-16 13:06:33 +02:00
parent 6514caa09e
commit 9aab78a6e9
2 changed files with 5 additions and 9 deletions

View File

@ -199,9 +199,9 @@ bool RocksDBEdgeIndexIterator::next(TokenCallback const& cb, size_t limit) {
while (_iterator->Valid() && (_index->_cmp->Compare(_iterator->key(), _bounds.end()) < 0)) {
StringRef edgeKey = RocksDBKey::primaryKey(_iterator->key());
// lookup real document
bool continueWithNextBatch = lookupDocumentAndUseCb(edgeKey, cb, limit, token, false);
bool continueWithNextBatch = lookupDocumentAndUseCb(edgeKey, cb, limit, token);
// build cache value for from/to
if(_useCache){
@ -243,7 +243,7 @@ bool RocksDBEdgeIndexIterator::next(TokenCallback const& cb, size_t limit) {
// acquire the document token through the primary index
bool RocksDBEdgeIndexIterator::lookupDocumentAndUseCb(
StringRef primaryKey, TokenCallback const& cb,
size_t& limit, RocksDBToken& token, bool fromCache){
size_t& limit, RocksDBToken& token){
//we pass the token in as ref to avoid allocations
auto rocksColl = toRocksDBCollection(_collection);
Result res = rocksColl->lookupDocumentToken(_trx, primaryKey, token);
@ -251,11 +251,7 @@ bool RocksDBEdgeIndexIterator::lookupDocumentAndUseCb(
cb(token);
--limit;
if (limit == 0) {
if(fromCache) {
_doUpdateArrayIterator=false; //limit hit continue with next batch
} else {
_doUpdateBounds=false; //limit hit continue with next batch
}
_doUpdateBounds=false; //limit hit continue with next batch
return true;
}
} // TODO do we need to handle failed lookups here?

View File

@ -62,7 +62,7 @@ class RocksDBEdgeIndexIterator final : public IndexIterator {
private:
void updateBounds(StringRef fromTo);
bool lookupDocumentAndUseCb(
StringRef primaryKey, TokenCallback const&, size_t& limit, RocksDBToken&, bool fromCache);
StringRef primaryKey, TokenCallback const&, size_t& limit, RocksDBToken&);
std::unique_ptr<arangodb::velocypack::Builder> _keys;
arangodb::velocypack::ArrayIterator _keysIterator;
RocksDBEdgeIndex const* _index;