From f3a1f128eec352da42b64c0175c6bac10fbcb01f Mon Sep 17 00:00:00 2001 From: Jan Christoph Uhde Date: Mon, 20 Feb 2017 10:26:38 +0100 Subject: [PATCH] remove isFullyCollected from LogicalCollection --- arangod/MMFiles/MMFilesCleanupThread.cpp | 2 +- arangod/Utils/CollectionExport.cpp | 3 ++- arangod/VocBase/LogicalCollection.cpp | 5 ----- arangod/VocBase/LogicalCollection.h | 4 ---- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arangod/MMFiles/MMFilesCleanupThread.cpp b/arangod/MMFiles/MMFilesCleanupThread.cpp index 3f00b68d2c..32a52ebd18 100644 --- a/arangod/MMFiles/MMFilesCleanupThread.cpp +++ b/arangod/MMFiles/MMFilesCleanupThread.cpp @@ -226,7 +226,7 @@ void MMFilesCleanupThread::cleanupCollection(arangodb::LogicalCollection* collec } } - if (!collection->isFullyCollected()) { + if (!collection->getPhysical()->isFullyCollected()) { bool isDeleted = false; // if there is still some garbage collection to perform, diff --git a/arangod/Utils/CollectionExport.cpp b/arangod/Utils/CollectionExport.cpp index a78e79e3cd..057ef9fd0d 100644 --- a/arangod/Utils/CollectionExport.cpp +++ b/arangod/Utils/CollectionExport.cpp @@ -31,6 +31,7 @@ #include "Transaction/Hints.h" #include "VocBase/Ditch.h" #include "VocBase/LogicalCollection.h" +#include "VocBase/PhysicalCollection.h" #include "VocBase/vocbase.h" using namespace arangodb; @@ -78,7 +79,7 @@ void CollectionExport::run(uint64_t maxWaitTime, size_t limit) { uint64_t const maxTries = maxWaitTime / SleepTime; while (++tries < maxTries) { - if (_collection->isFullyCollected()) { + if (_collection->getPhysical()->isFullyCollected()) { break; } usleep(SleepTime); diff --git a/arangod/VocBase/LogicalCollection.cpp b/arangod/VocBase/LogicalCollection.cpp index 83b319383c..150c681545 100644 --- a/arangod/VocBase/LogicalCollection.cpp +++ b/arangod/VocBase/LogicalCollection.cpp @@ -525,11 +525,6 @@ bool LogicalCollection::IsAllowedName(bool allowSystem, return true; } -/// @brief whether or not a collection is fully collected -bool LogicalCollection::isFullyCollected() { - return getPhysical()->isFullyCollected(); -} - uint64_t LogicalCollection::numberDocuments() const { // TODO Ask StorageEngine instead return primaryIndex()->size(); diff --git a/arangod/VocBase/LogicalCollection.h b/arangod/VocBase/LogicalCollection.h index 41ad3584c8..af11867af7 100644 --- a/arangod/VocBase/LogicalCollection.h +++ b/arangod/VocBase/LogicalCollection.h @@ -104,10 +104,6 @@ class LogicalCollection { static bool IsAllowedName(velocypack::Slice parameters); static bool IsAllowedName(bool isSystem, std::string const& name); - // TODO: MOVE TO PHYSICAL? - bool isFullyCollected(); //should not be exposed - - // SECTION: Meta Information uint32_t version() const { return _version; }