diff --git a/arangod/VocBase/LogicalCollection.cpp b/arangod/VocBase/LogicalCollection.cpp index 6545d2255e..3732053e2b 100644 --- a/arangod/VocBase/LogicalCollection.cpp +++ b/arangod/VocBase/LogicalCollection.cpp @@ -823,15 +823,19 @@ void LogicalCollection::toVelocyPackForClusterInventory(VPackBuilder& result, } result.openObject(); result.add(VPackValue("parameters")); - result.openObject(); - toVelocyPackInObject(result, true); - result.close(); + + std::unordered_set ignoreKeys{"allowUserKeys", "cid", "count", + "statusString" + "version"}; + VPackBuilder params = toVelocyPackIgnore(ignoreKeys, true); + result.add(params.slice()); + result.add(VPackValue("indexes")); getIndexesVPack(result, false); result.close(); // CollectionInfo } -void LogicalCollection::toVelocyPack2(VPackBuilder& result, bool translateCids) const { +void LogicalCollection::toVelocyPack(VPackBuilder& result, bool translateCids) const { // We write into an open object TRI_ASSERT(result.isOpenObject()); @@ -922,7 +926,7 @@ void LogicalCollection::toVelocyPack2(VPackBuilder& result, bool translateCids) VPackBuilder LogicalCollection::toVelocyPackIgnore(std::unordered_set const& ignoreKeys, bool translateCids) const { VPackBuilder full; full.openObject(); - toVelocyPack2(full, translateCids); + toVelocyPack(full, translateCids); full.close(); return VPackCollection::remove(full.slice(), ignoreKeys); } @@ -974,13 +978,6 @@ void LogicalCollection::toVelocyPackInObject(VPackBuilder& result, bool translat getIndexesVPack(result, false); } -void LogicalCollection::toVelocyPack(VPackBuilder& builder, bool includeIndexes, - TRI_voc_tick_t maxTick) { - TRI_ASSERT(!builder.isClosed()); - StorageEngine* engine = EngineSelectorFeature::ENGINE; - engine->getCollectionInfo(_vocbase, _cid, builder, includeIndexes, maxTick); -} - void LogicalCollection::increaseInternalVersion() { ++_internalVersion; } CollectionResult LogicalCollection::updateProperties(VPackSlice const& slice, diff --git a/arangod/VocBase/LogicalCollection.h b/arangod/VocBase/LogicalCollection.h index 7810dfa9a6..373f8abc4c 100644 --- a/arangod/VocBase/LogicalCollection.h +++ b/arangod/VocBase/LogicalCollection.h @@ -243,21 +243,14 @@ class LogicalCollection { virtual void setStatus(TRI_vocbase_col_status_e); // SECTION: Serialisation - void toVelocyPack2(velocypack::Builder&, bool translateCids) const; + void toVelocyPack(velocypack::Builder&, bool translateCids) const; velocypack::Builder toVelocyPackIgnore( std::unordered_set const& ignoreKeys, bool translateCids) const; - // void toVelocyPack(velocypack::Builder&, bool withPath) const; - virtual void toVelocyPackForClusterInventory(velocypack::Builder&, bool useSystem) const; - // virtual void toVelocyPackForClusterCollectionInfo(velocypack::Builder&) const; - - /// @brief transform the information for this collection to velocypack - /// The builder has to be an opened Type::Object - void toVelocyPack(velocypack::Builder&, bool, TRI_voc_tick_t); inline TRI_vocbase_t* vocbase() const { return _vocbase; } diff --git a/arangod/VocBase/vocbase.cpp b/arangod/VocBase/vocbase.cpp index 7fa097b24c..53c492104e 100644 --- a/arangod/VocBase/vocbase.cpp +++ b/arangod/VocBase/vocbase.cpp @@ -783,7 +783,10 @@ std::shared_ptr TRI_vocbase_t::inventory(TRI_voc_tick_t maxTick, continue; } - collection->toVelocyPack(*builder, true, maxTick); + TRI_ASSERT(!builder->isClosed()); + StorageEngine* engine = EngineSelectorFeature::ENGINE; + engine->getCollectionInfo(collection->vocbase(), collection->cid(), + *(builder.get()), true, maxTick); } builder->close();