diff --git a/arangod/VocBase/collection.cpp b/arangod/VocBase/collection.cpp index dc41d81c1c..74313e9012 100644 --- a/arangod/VocBase/collection.cpp +++ b/arangod/VocBase/collection.cpp @@ -121,6 +121,10 @@ bool TRI_collection_t::IsAllowedName(bool allowSystem, std::string const& name) return true; } + +std::string TRI_collection_t::label() const { + return _vocbase->name() + " / " + _info.name(); +} /// @brief updates the parameter info block int TRI_collection_t::updateCollectionInfo(TRI_vocbase_t* vocbase, diff --git a/arangod/VocBase/collection.h b/arangod/VocBase/collection.h index 47fec51e7c..7964332703 100644 --- a/arangod/VocBase/collection.h +++ b/arangod/VocBase/collection.h @@ -321,6 +321,7 @@ struct TRI_collection_t { void addIndexFile(std::string const&); int removeIndexFile(TRI_idx_iid_t); std::string const& path() const { return _path; } + std::string label() const; private: /// @brief seal a datafile @@ -346,6 +347,9 @@ struct TRI_collection_t { std::vector _datafiles; // all datafiles std::vector _journals; // all journals std::vector _compactors; // all compactor files + + // lock for indexes + arangodb::basics::ReadWriteLock _lock; private: std::vector _indexFiles; // all index filenames }; diff --git a/arangod/VocBase/document-collection.cpp b/arangod/VocBase/document-collection.cpp index 9b38fb79e7..2b91683a2c 100644 --- a/arangod/VocBase/document-collection.cpp +++ b/arangod/VocBase/document-collection.cpp @@ -87,7 +87,6 @@ using namespace arangodb::basics; TRI_document_collection_t::TRI_document_collection_t(TRI_vocbase_t* vocbase) : TRI_collection_t(vocbase), - _lock(), _nextCompactionStartIndex(0), _lastCompactionStatus(nullptr), _useSecondaryIndexes(true), @@ -113,10 +112,6 @@ TRI_document_collection_t::~TRI_document_collection_t() { delete _keyGenerator; } -std::string TRI_document_collection_t::label() const { - return _vocbase->name() + " / " + _info.name(); -} - //////////////////////////////////////////////////////////////////////////////// /// @brief update statistics for a collection /// note: the write-lock for the collection must be held to call this diff --git a/arangod/VocBase/document-collection.h b/arangod/VocBase/document-collection.h index 9fa2736348..db5ddd7001 100644 --- a/arangod/VocBase/document-collection.h +++ b/arangod/VocBase/document-collection.h @@ -97,14 +97,6 @@ struct TRI_document_collection_t : public TRI_collection_t { ~TRI_document_collection_t(); - std::string label() const; - - // ........................................................................... - // this lock protects the indexes and _headers attributes - // ........................................................................... - - arangodb::basics::ReadWriteLock _lock; - private: arangodb::Mutex _compactionStatusLock; size_t _nextCompactionStartIndex;