mirror of https://gitee.com/bigwinds/arangodb
fixed "collection not found" errors
This commit is contained in:
parent
a2085066e0
commit
b5cfdb47b3
|
@ -837,9 +837,9 @@ std::vector<std::string> TRI_vocbase_t::collectionNames() {
|
||||||
std::vector<std::string> result;
|
std::vector<std::string> result;
|
||||||
|
|
||||||
READ_LOCKER(readLocker, _collectionsLock);
|
READ_LOCKER(readLocker, _collectionsLock);
|
||||||
|
result.reserve(_collectionsByName.size());
|
||||||
for (auto const& it : _collectionsById) {
|
for (auto const& it : _collectionsByName) {
|
||||||
result.emplace_back(it.second->name());
|
result.emplace_back(it.first);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1421,7 +1421,10 @@ std::vector<TRI_vocbase_col_t*> TRI_vocbase_t::collections() {
|
||||||
|
|
||||||
{
|
{
|
||||||
READ_LOCKER(readLocker, _collectionsLock);
|
READ_LOCKER(readLocker, _collectionsLock);
|
||||||
collections = _collections;
|
collections.reserve(_collectionsById.size());
|
||||||
|
for (auto const& it : _collectionsById) {
|
||||||
|
collections.emplace_back(it.second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return collections;
|
return collections;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue