1
0
Fork 0

small cleanup

This commit is contained in:
jsteemann 2016-08-16 14:21:58 +02:00
parent d5af72f47f
commit 61fc8993c6
3 changed files with 3 additions and 13 deletions

View File

@ -1627,19 +1627,13 @@ int MMFilesEngine::openCollection(TRI_vocbase_t* vocbase, TRI_collection_t* coll
}
}
// .............................................................................
// file is an index, just store the filename
// .............................................................................
if (filetype == "index" && extension == "json") {
collection->addIndexFile(filename);
continue;
}
// .............................................................................
// file is a journal or datafile, open the datafile
// .............................................................................
if (extension == "db") {
// found a compaction file. now rename it back
if (filetype == "compaction") {

View File

@ -82,8 +82,7 @@ class Transaction {
friend class Transaction;
std::shared_ptr<arangodb::Index> _index;
public:
IndexHandle() {
}
IndexHandle() = default;
void toVelocyPack(arangodb::velocypack::Builder& builder,
bool withFigures) const;
bool operator==(IndexHandle const& other) const {

View File

@ -146,7 +146,7 @@ static bool OpenIndexIterator(std::string const& filename, void* data) {
return true;
}
/// @brief converts extracts a field list from a VelocyPack object
/// @brief extracts a field list from a VelocyPack object
/// Does not copy any data, caller has to make sure that data
/// in slice stays valid until this return value is destroyed.
static VPackSlice ExtractFields(VPackSlice const& slice, TRI_idx_iid_t iid) {
@ -1289,12 +1289,9 @@ void TRI_collection_t::addIndexFile(std::string const& filename) {
_indexFiles.emplace_back(filename);
}
////////////////////////////////////////////////////////////////////////////////
/// @brief removes an index file from the _indexFiles vector
////////////////////////////////////////////////////////////////////////////////
bool TRI_collection_t::removeIndexFileFromVector(TRI_idx_iid_t id) {
READ_LOCKER(readLocker, _filesLock);
WRITE_LOCKER(readLocker, _filesLock);
for (auto it = _indexFiles.begin(); it != _indexFiles.end(); ++it) {
if (GetNumericFilenamePart((*it).c_str()) == id) {