From b31cf711b91533b41c516f15ff5ce08dff22b06a Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 26 Aug 2016 10:11:29 +0200 Subject: [PATCH] Now properly fill the indexes when creating a new one. Also slight modifiaction of drop --- arangod/VocBase/LogicalCollection.cpp | 6 ++++-- arangod/VocBase/vocbase.cpp | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arangod/VocBase/LogicalCollection.cpp b/arangod/VocBase/LogicalCollection.cpp index e6b4904ddd..20bc00ec5a 100644 --- a/arangod/VocBase/LogicalCollection.cpp +++ b/arangod/VocBase/LogicalCollection.cpp @@ -603,8 +603,10 @@ int LogicalCollection::close() { } void LogicalCollection::drop() { + TRI_ASSERT(!ServerState::instance()->isCoordinator()); + StorageEngine* engine = EngineSelectorFeature::ENGINE; + engine->dropCollection(_vocbase, this); _isDeleted = true; - // TODO Do we need to do more or does the Engine do it? } void LogicalCollection::setStatus(TRI_vocbase_col_status_e status) { @@ -901,9 +903,9 @@ std::shared_ptr LogicalCollection::createIndex(Transaction* trx, break; } } - // TODO fillIndexes addIndex(newIdx); + fillIndex(trx, newIdx.get(), false); return newIdx; } diff --git a/arangod/VocBase/vocbase.cpp b/arangod/VocBase/vocbase.cpp index 35c8a57422..ccc71ebb5a 100644 --- a/arangod/VocBase/vocbase.cpp +++ b/arangod/VocBase/vocbase.cpp @@ -285,9 +285,7 @@ bool TRI_vocbase_t::DropCollectionCallback(arangodb::LogicalCollection* collecti } catch (...) { } } - - StorageEngine* engine = EngineSelectorFeature::ENGINE; - engine->dropCollection(vocbase, collection); + collection->drop(); return true; }