mirror of https://gitee.com/bigwinds/arangodb
Fix unit tests with latest hash index changes.
This commit is contained in:
parent
dac7fb06e0
commit
f279bf5778
|
@ -504,7 +504,7 @@ int HashIndex::lookup (TRI_index_search_value_t* searchValue,
|
||||||
|
|
||||||
std::vector<TRI_hash_index_element_t*>* results = nullptr;
|
std::vector<TRI_hash_index_element_t*>* results = nullptr;
|
||||||
|
|
||||||
if (next != nullptr) {
|
if (next == nullptr) {
|
||||||
try {
|
try {
|
||||||
results = _multi._hashArray->lookupByKey(searchValue, batchSize);
|
results = _multi._hashArray->lookupByKey(searchValue, batchSize);
|
||||||
}
|
}
|
||||||
|
@ -522,17 +522,25 @@ int HashIndex::lookup (TRI_index_search_value_t* searchValue,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (results != nullptr) {
|
if (results != nullptr) {
|
||||||
next = results->back(); // for continuation the next time
|
if (results->size() > 0) {
|
||||||
try {
|
next = results->back(); // for continuation the next time
|
||||||
for (size_t i = 0; i < results->size(); i++) {
|
try {
|
||||||
documents.emplace_back(*((*results)[i]->_document));
|
for (size_t i = 0; i < results->size(); i++) {
|
||||||
|
documents.emplace_back(*((*results)[i]->_document));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
delete results;
|
||||||
|
return TRI_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
delete results;
|
|
||||||
}
|
}
|
||||||
catch (...) {
|
else {
|
||||||
delete results;
|
next = nullptr;
|
||||||
return TRI_ERROR_OUT_OF_MEMORY;
|
|
||||||
}
|
}
|
||||||
|
delete results;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
next = nullptr;
|
||||||
}
|
}
|
||||||
return TRI_ERROR_NO_ERROR;
|
return TRI_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue