1
0
Fork 0

Remove USE_IRESEARCH definition and usage (#8613)

This commit is contained in:
KVS85 2019-03-28 19:23:51 +03:00 committed by Frank Celler
parent 7eee9f82ea
commit 2d5bf58c94
30 changed files with 213 additions and 362 deletions

View File

@ -89,11 +89,6 @@ if (USE_PRECOMPILED_V8)
FORCE
)
else ()
# meaningless IResearch circus that makes the windows build fail
#if (MSVC AND USE_IRESEARCH)
# set(V8_TARGET_ARCHS "Debug;Release") # need to build both ICU for IResearch otherwise no library to link with
#endif ()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/V8)
set(ICU_DT "${ICU_DT}" PARENT_SCOPE)
set(ICU_DT_DEST "${ICU_DT_DEST}" PARENT_SCOPE)
@ -119,89 +114,86 @@ set(BOOST_VERSION ${BOOST_VERSION} PARENT_SCOPE)
## IResearch
################################################################################
if (USE_IRESEARCH)
add_library(boost-static IMPORTED STATIC)
set_target_properties(boost-static PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/boost/${BOOST_VERSION}"
IMPORTED_LOCATION "boost_locale;boost_system;boost_thread"
)
add_library(boost-static IMPORTED STATIC)
set_target_properties(boost-static PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/boost/${BOOST_VERSION}"
IMPORTED_LOCATION "boost_locale;boost_system;boost_thread"
)
# explicitly set since suppressing Boost search
set(Boost_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/boost/${BOOST_VERSION}")
# explicitly set since suppressing Boost search
set(Boost_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/boost/${BOOST_VERSION}")
# IResearch on MacOS requires a complete build of ICU for encoding conversion
if(APPLE)
set(ICU_LIBS icu-static CACHE INTERNAL "ICU: Libraries" FORCE) # use complete ICU build
set(ICU_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/V8/${V8_SUB_DIR}/third_party/icu")
elseif(MSVC)
add_library(icu-shared STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch shared dependencies
add_library(icudata-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icui18n-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icuuc-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icu-static STATIC IMPORTED GLOBAL)
set_property(TARGET icu-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_DEBUG "${ICU_ROOT}/Debug/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_RELEASE "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_RELWITHDEBINFO "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_MINSIZEREL "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_DEBUG "${ICU_ROOT}/Debug/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_RELEASE "${ICU_ROOT}/Release/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_RELWITHDEBINFO "${ICU_ROOT}/Release/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_MINSIZEREL "${ICU_ROOT}/Release/lib/icuuc.lib")
set(ICU_FOUND TRUE) # ICU built from source in 3rdParty directory
else()
add_library(icu-shared STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch shared dependencies
add_library(icudata-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icui18n-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icuuc-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icu-static STATIC IMPORTED GLOBAL)
set_property(TARGET icu-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION "${ICU_LIBRARY_DIR}/libicui18n.a")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES "${ICU_LIBRARY_DIR}/libicuuc.a")
set(ICU_FOUND TRUE) # ICU built from source in 3rdParty directory
endif()
# IResearch on MacOS requires a complete build of ICU for encoding conversion
if(APPLE)
set(ICU_LIBS icu-static CACHE INTERNAL "ICU: Libraries" FORCE) # use complete ICU build
set(ICU_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/V8/${V8_SUB_DIR}/third_party/icu")
elseif(MSVC)
add_library(icu-shared STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch shared dependencies
add_library(icudata-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icui18n-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icuuc-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icu-static STATIC IMPORTED GLOBAL)
set_property(TARGET icu-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_DEBUG "${ICU_ROOT}/Debug/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_RELEASE "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_RELWITHDEBINFO "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION_MINSIZEREL "${ICU_ROOT}/Release/lib/icui18n.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_DEBUG "${ICU_ROOT}/Debug/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_RELEASE "${ICU_ROOT}/Release/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_RELWITHDEBINFO "${ICU_ROOT}/Release/lib/icuuc.lib")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES_MINSIZEREL "${ICU_ROOT}/Release/lib/icuuc.lib")
set(ICU_FOUND TRUE) # ICU built from source in 3rdParty directory
else()
add_library(icu-shared STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch shared dependencies
add_library(icudata-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icui18n-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icuuc-static STATIC IMPORTED GLOBAL) # empty unused library to satisfy IResearch static dependencies
add_library(icu-static STATIC IMPORTED GLOBAL)
set_property(TARGET icu-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ICU_INCLUDE_DIR}")
set_property(TARGET icu-static PROPERTY IMPORTED_LOCATION "${ICU_LIBRARY_DIR}/libicui18n.a")
set_property(TARGET icu-static PROPERTY INTERFACE_LINK_LIBRARIES "${ICU_LIBRARY_DIR}/libicuuc.a")
set(ICU_FOUND TRUE) # ICU built from source in 3rdParty directory
endif()
if(NOT PERL_FOUND)
set(PERL_FOUND TRUE) # suppress error for Perl not-found
if(NOT PERL_FOUND)
set(PERL_FOUND TRUE) # suppress error for Perl not-found
# MSVC will execute ADD_CUSTOM_COMMAND even though OUTPUT is already present
if(MSVC)
set(PERL_EXECUTABLE echo)
endif()
endif()
set(LZ4_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/lz4")
set(SNOWBALL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/snowball")
set(UNWIND_ROOT "invalid")
set(BFD_ROOT "invalid")
find_package(IResearch REQUIRED) # set IRESEARCH_BUILD_DIR
set(CMAKE_MACOSX_RPATH ON) # suppress cmake warning (use same value as cmake default)
set(CMAKE_MODULE_PATH_ORIGINAL ${CMAKE_MODULE_PATH}) # remember CMAKE_MODULE_PATH
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake" # cmake overrides (must be first)
"${IRESEARCH_ROOT}/cmake" # to find iResearch dependencies
)
# copy pre-built files over to the build directory
# this is required to avoid triggering file generation via bison and perl during the build procedure
file(GLOB_RECURSE IRESEARCH_PREBUILT RELATIVE "${IRESEARCH_ROOT}.build" FOLLOW_SYMLINKS "${IRESEARCH_ROOT}.build/*")
foreach(ELEMENT ${IRESEARCH_PREBUILT})
configure_file("${IRESEARCH_ROOT}.build/${ELEMENT}" "${IRESEARCH_BUILD_DIR}/${ELEMENT}" COPYONLY)
endforeach()
add_subdirectory("${IRESEARCH_ROOT}" "${IRESEARCH_BUILD_DIR}" EXCLUDE_FROM_ALL) # do not build unused targets
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_ORIGINAL}) # restore CMAKE_MODULE_PATH
unset(BUILD_SHARED_LIBS) # otherwise ZLib (below) does not build on win32
unset(BUILD_SHARED_LIBS CACHE) # otherwise ZLib (below) does not build on win32
if(APPLE)
# cmake does not build ICU without this (cmake does not inherit dependencies)
add_dependencies(v8_build icu-build icudata-static icui18n-static icuuc-static)
# MSVC will execute ADD_CUSTOM_COMMAND even though OUTPUT is already present
if(MSVC)
set(PERL_EXECUTABLE echo)
endif()
endif()
set(LZ4_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/lz4")
set(SNOWBALL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/snowball")
set(UNWIND_ROOT "invalid")
set(BFD_ROOT "invalid")
find_package(IResearch REQUIRED) # set IRESEARCH_BUILD_DIR
set(CMAKE_MACOSX_RPATH ON) # suppress cmake warning (use same value as cmake default)
set(CMAKE_MODULE_PATH_ORIGINAL ${CMAKE_MODULE_PATH}) # remember CMAKE_MODULE_PATH
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake" # cmake overrides (must be first)
"${IRESEARCH_ROOT}/cmake" # to find iResearch dependencies
)
# copy pre-built files over to the build directory
# this is required to avoid triggering file generation via bison and perl during the build procedure
file(GLOB_RECURSE IRESEARCH_PREBUILT RELATIVE "${IRESEARCH_ROOT}.build" FOLLOW_SYMLINKS "${IRESEARCH_ROOT}.build/*")
foreach(ELEMENT ${IRESEARCH_PREBUILT})
configure_file("${IRESEARCH_ROOT}.build/${ELEMENT}" "${IRESEARCH_BUILD_DIR}/${ELEMENT}" COPYONLY)
endforeach()
add_subdirectory("${IRESEARCH_ROOT}" "${IRESEARCH_BUILD_DIR}" EXCLUDE_FROM_ALL) # do not build unused targets
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_ORIGINAL}) # restore CMAKE_MODULE_PATH
unset(BUILD_SHARED_LIBS) # otherwise ZLib (below) does not build on win32
unset(BUILD_SHARED_LIBS CACHE) # otherwise ZLib (below) does not build on win32
if(APPLE)
# cmake does not build ICU without this (cmake does not inherit dependencies)
add_dependencies(v8_build icu-build icudata-static icui18n-static icuuc-static)
endif()
################################################################################
## cURL

View File

@ -1007,13 +1007,7 @@ endif ()
# IResearch
# ------------------------------------------------------------------------------
option(USE_IRESEARCH "enable ArangoSearch views" ON)
if(USE_IRESEARCH)
add_definitions("-DUSE_IRESEARCH=1")
set(LIB_ARANGO_IRESEARCH arango_iresearch)
endif()
set(LIB_ARANGO_IRESEARCH arango_iresearch)
# 3rdParty exports:
#

View File

@ -147,7 +147,7 @@ MAKE=make
PACKAGE_MAKE=make
MAKE_PARAMS=()
MAKE_CMD_PREFIX=""
CONFIGURE_OPTIONS+=("$CMAKE_OPENSSL -DGENERATE_BUILD_DATE=OFF -DUSE_IRESEARCH=On")
CONFIGURE_OPTIONS+=("$CMAKE_OPENSSL -DGENERATE_BUILD_DATE=OFF")
INSTALL_PREFIX="/"
MAINTAINER_MODE="-DUSE_MAINTAINER_MODE=off"

View File

@ -450,9 +450,7 @@ struct UserVarFinder final : public WalkerWorker<ExecutionNode> {
en->getType() == ExecutionNode::ENUMERATE_LIST ||
en->getType() == ExecutionNode::TRAVERSAL ||
en->getType() == ExecutionNode::SHORTEST_PATH ||
#ifdef USE_IRESEARCH
en->getType() == ExecutionNode::ENUMERATE_IRESEARCH_VIEW ||
#endif
en->getType() == ExecutionNode::COLLECT) {
depth += 1;
}

View File

@ -43,9 +43,7 @@ bool ConditionFinder::before(ExecutionNode* en) {
case EN::RETURN:
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
{
// in these cases we simply ignore the intermediate nodes, note
// that we have taken care of nodes that could throw exceptions

View File

@ -44,9 +44,7 @@
#include "Utils/CollectionNameResolver.h"
#include "VocBase/LogicalCollection.h"
#include "VocBase/ticks.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewNode.h"
#endif
using namespace arangodb;
using namespace arangodb::aql;
@ -188,7 +186,6 @@ void EngineInfoContainerDBServer::EngineInfo::addNode(ExecutionNode* node) {
setRestrictedShard(ExecutionNode::castTo<IndexNode*>(node), _source);
break;
}
#ifdef USE_IRESEARCH
case ExecutionNode::ENUMERATE_IRESEARCH_VIEW: {
TRI_ASSERT(EngineType::Collection == type());
auto& viewNode = *ExecutionNode::castTo<iresearch::IResearchViewNode*>(node);
@ -201,7 +198,6 @@ void EngineInfoContainerDBServer::EngineInfo::addNode(ExecutionNode* node) {
findFirstScatter(viewNode));
break;
}
#endif
case ExecutionNode::INSERT:
case ExecutionNode::UPDATE:
case ExecutionNode::REMOVE:
@ -232,7 +228,6 @@ void EngineInfoContainerDBServer::EngineInfo::collection(Collection* col) noexce
source->collection = col;
}
#ifdef USE_IRESEARCH
LogicalView const* EngineInfoContainerDBServer::EngineInfo::view() const noexcept {
TRI_ASSERT(EngineType::View == type());
auto* source = boost::get<ViewSource>(&_source);
@ -257,7 +252,6 @@ void EngineInfoContainerDBServer::EngineInfo::addClient(ServerID const& server)
source->gather->sortMode(GatherNode::evaluateSortMode(++source->numClients));
}
}
#endif
void EngineInfoContainerDBServer::EngineInfo::serializeSnippet(
ServerID const& serverId, Query& query, std::vector<ShardID> const& shards,
@ -287,13 +281,10 @@ void EngineInfoContainerDBServer::EngineInfo::serializeSnippet(
// "varUsageComputed" flag below (which will handle the counting)
plan.increaseCounter(nodeType);
#ifdef USE_IRESEARCH
if (ExecutionNode::ENUMERATE_IRESEARCH_VIEW == nodeType) {
auto* viewNode = ExecutionNode::castTo<iresearch::IResearchViewNode*>(clone);
viewNode->shards() = shards;
} else
#endif
if (ExecutionNode::REMOTE == nodeType) {
} else if (ExecutionNode::REMOTE == nodeType) {
auto rem = ExecutionNode::castTo<RemoteNode*>(clone);
// update the remote node with the information about the query
rem->server("server:" + arangodb::ServerState::instance()->getId());
@ -451,7 +442,6 @@ void EngineInfoContainerDBServer::addNode(ExecutionNode* node) {
updateCollection(col);
break;
}
#ifdef USE_IRESEARCH
case ExecutionNode::ENUMERATE_IRESEARCH_VIEW: {
auto& viewNode = *ExecutionNode::castTo<iresearch::IResearchViewNode*>(node);
auto* view = viewNode.view().get();
@ -463,7 +453,6 @@ void EngineInfoContainerDBServer::addNode(ExecutionNode* node) {
break;
}
#endif
case ExecutionNode::INSERT:
case ExecutionNode::UPDATE:
case ExecutionNode::REMOVE:
@ -508,12 +497,9 @@ void EngineInfoContainerDBServer::closeSnippet(QueryId coordinatorEngineId) {
e->connectQueryId(coordinatorEngineId);
#ifdef USE_IRESEARCH
if (EngineInfo::EngineType::View == e->type()) {
_viewInfos[e->view()].engines.emplace_back(std::move(e));
} else
#endif
{
} else {
TRI_ASSERT(e->collection() != nullptr);
auto it = _collectionInfos.find(e->collection());
// This is not possible we have a snippet where no collection is involved
@ -644,7 +630,6 @@ void EngineInfoContainerDBServer::DBServerInfo::buildMessage(
EngineInfo& engine = *it.first;
std::vector<ShardID> const& shards = it.second;
#ifdef USE_IRESEARCH
// serialize for the list of shards
if (engine.type() == EngineInfo::EngineType::View) {
engine.serializeSnippet(serverId, query, shards, infoBuilder);
@ -652,7 +637,6 @@ void EngineInfoContainerDBServer::DBServerInfo::buildMessage(
continue;
}
#endif
bool isResponsibleForInit = true;
for (auto const& shard : shards) {

View File

@ -109,10 +109,8 @@ class EngineInfoContainerDBServer {
return static_cast<EngineType>(_source.which());
}
#ifdef USE_IRESEARCH
LogicalView const* view() const noexcept;
void addClient(ServerID const& server);
#endif
private:
struct CollectionSource {

View File

@ -58,10 +58,7 @@
#include "StorageEngine/StorageEngine.h"
#include "Transaction/Methods.h"
#include "Utils/OperationCursor.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewNode.h"
#endif
#include <velocypack/Iterator.h>
#include <velocypack/velocypack-aliases.h>
@ -99,10 +96,8 @@ std::unordered_map<int, std::string const> const typeNames{
{static_cast<int>(ExecutionNode::SHORTEST_PATH), "ShortestPathNode"},
{static_cast<int>(ExecutionNode::REMOTESINGLE),
"SingleRemoteOperationNode"},
#ifdef USE_IRESEARCH
{static_cast<int>(ExecutionNode::ENUMERATE_IRESEARCH_VIEW),
"EnumerateViewNode"},
#endif
};
// FIXME -- this temporary function should be
@ -329,10 +324,8 @@ ExecutionNode* ExecutionNode::fromVPackFactory(ExecutionPlan* plan, VPackSlice c
return new ShortestPathNode(plan, slice);
case REMOTESINGLE:
return new SingleRemoteOperationNode(plan, slice);
#ifdef USE_IRESEARCH
case ENUMERATE_IRESEARCH_VIEW:
return new iresearch::IResearchViewNode(*plan, slice);
#endif
default: {
// should not reach this point
TRI_ASSERT(false);
@ -621,9 +614,7 @@ ExecutionNode const* ExecutionNode::getLoop() const {
if (type == ENUMERATE_COLLECTION || type == INDEX || type == TRAVERSAL ||
type == ENUMERATE_LIST || type == SHORTEST_PATH
#ifdef USE_IRESEARCH
|| type == ENUMERATE_IRESEARCH_VIEW
#endif
) {
return node;
}
@ -1062,7 +1053,6 @@ void ExecutionNode::RegisterPlan::after(ExecutionNode* en) {
break;
}
#ifdef USE_IRESEARCH
case ExecutionNode::ENUMERATE_IRESEARCH_VIEW: {
auto ep = ExecutionNode::castTo<iresearch::IResearchViewNode const*>(en);
TRI_ASSERT(ep);
@ -1070,7 +1060,6 @@ void ExecutionNode::RegisterPlan::after(ExecutionNode* en) {
ep->planNodeRegisters(nrRegsHere, nrRegs, varInfo, totalNrRegs, ++depth);
break;
}
#endif
default: {
// should not reach this point
@ -1732,9 +1721,7 @@ bool SubqueryNode::mayAccessCollections() {
// if the subquery contains any of these nodes, it may access data from
// a collection
std::vector<ExecutionNode::NodeType> const types = {
#ifdef USE_IRESEARCH
ExecutionNode::ENUMERATE_IRESEARCH_VIEW,
#endif
ExecutionNode::ENUMERATE_COLLECTION,
ExecutionNode::INDEX,
ExecutionNode::INSERT,

View File

@ -145,9 +145,7 @@ class ExecutionNode {
INDEX = 23,
SHORTEST_PATH = 24,
REMOTESINGLE = 25,
#ifdef USE_IRESEARCH
ENUMERATE_IRESEARCH_VIEW,
#endif
MAX_NODE_TYPE_VALUE
};

View File

@ -47,10 +47,7 @@
#include "Graph/ShortestPathOptions.h"
#include "Graph/TraverserOptions.h"
#include "VocBase/AccessMode.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewNode.h"
#endif
#include <velocypack/Iterator.h>
#include <velocypack/Options.h>
@ -865,7 +862,6 @@ ExecutionNode* ExecutionPlan::fromNodeFor(ExecutionNode* previous, AstNode const
"no collection for EnumerateCollection");
}
en = registerNode(new EnumerateCollectionNode(this, nextId(), collection, v, false, hint));
#ifdef USE_IRESEARCH
} else if (expression->type == NODE_TYPE_VIEW) {
// second operand is a view
std::string const viewName = expression->getString();
@ -893,7 +889,6 @@ ExecutionNode* ExecutionPlan::fromNodeFor(ExecutionNode* previous, AstNode const
en = registerNode(new iresearch::IResearchViewNode(*this, nextId(), vocbase, view,
*v, nullptr, options, {}));
#endif
} else if (expression->type == NODE_TYPE_REFERENCE) {
// second operand is already a variable
auto inVariable = static_cast<Variable*>(expression->getData());
@ -945,7 +940,6 @@ ExecutionNode* ExecutionPlan::fromNodeForView(ExecutionNode* previous, AstNode c
TRI_ASSERT(expression->type == NODE_TYPE_VIEW);
#ifdef USE_IRESEARCH
std::string const viewName = expression->getString();
auto& vocbase = _ast->query()->vocbase();
@ -978,9 +972,6 @@ ExecutionNode* ExecutionPlan::fromNodeForView(ExecutionNode* previous, AstNode c
en = registerNode(new iresearch::IResearchViewNode(*this, nextId(), vocbase, view, *v,
search->getMember(0), options, {}));
#else
THROW_ARANGO_EXCEPTION(TRI_ERROR_NOT_IMPLEMENTED);
#endif
TRI_ASSERT(en != nullptr);

View File

@ -166,10 +166,8 @@ struct OptimizerRule {
// remove redundant filters statements
removeFiltersCoveredByTraversal,
#ifdef USE_IRESEARCH
// move filters and sort conditions into views and remove them
handleArangoSearchViewsRule,
#endif
// remove calculations that are redundant
// needs to run after filter removal
@ -211,11 +209,9 @@ struct OptimizerRule {
// make operations on sharded collections use scatter / gather / remote
scatterInClusterRule,
#ifdef USE_IRESEARCH
// FIXME order-???
// make operations on sharded IResearch views use scatter / gather / remote
scatterIResearchViewInClusterRule,
#endif
// move FilterNodes & Calculation nodes in between
// scatter(remote) <-> gather(remote) so they're

View File

@ -61,9 +61,7 @@
#include "Utils/CollectionNameResolver.h"
#include "VocBase/Methods/Collections.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewNode.h"
#endif
#include <boost/optional.hpp>
#include <tuple>
@ -83,9 +81,7 @@ bool accessesCollectionVariable(arangodb::aql::ExecutionPlan const* plan,
continue;
}
if (setter->getType() == EN::INDEX || setter->getType() == EN::ENUMERATE_COLLECTION ||
#ifdef USE_IRESEARCH
setter->getType() == EN::ENUMERATE_IRESEARCH_VIEW ||
#endif
setter->getType() == EN::SUBQUERY || setter->getType() == EN::TRAVERSAL ||
setter->getType() == EN::SHORTEST_PATH) {
return true;
@ -1666,9 +1662,7 @@ void arangodb::aql::moveCalculationsDownRule(Optimizer* opt,
lastNode = current;
}
} else if (currentType == EN::INDEX || currentType == EN::ENUMERATE_COLLECTION ||
#ifdef USE_IRESEARCH
currentType == EN::ENUMERATE_IRESEARCH_VIEW ||
#endif
currentType == EN::ENUMERATE_LIST ||
currentType == EN::TRAVERSAL || currentType == EN::SHORTEST_PATH ||
currentType == EN::COLLECT || currentType == EN::NORESULTS) {
@ -2028,7 +2022,6 @@ class arangodb::aql::RedundantCalculationsReplacer final
}
}
#ifdef USE_IRESEARCH
void replaceInView(ExecutionNode* en) {
auto view = ExecutionNode::castTo<arangodb::iresearch::IResearchViewNode*>(en);
if (view->filterConditionIsEmpty()) {
@ -2058,7 +2051,6 @@ class arangodb::aql::RedundantCalculationsReplacer final
view->filterCondition(cloned);
}
}
#endif
bool before(ExecutionNode* en) override final {
switch (en->getType()) {
@ -2067,12 +2059,10 @@ class arangodb::aql::RedundantCalculationsReplacer final
break;
}
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW: {
replaceInView(en);
break;
}
#endif
case EN::RETURN: {
replaceInVariable<ReturnNode>(en);
@ -3130,9 +3120,7 @@ struct SortToIndexNode final : public WalkerWorker<ExecutionNode> {
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
case EN::ENUMERATE_LIST:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
// found some other FOR loop
return true;
@ -4348,9 +4336,7 @@ void arangodb::aql::distributeFilternCalcToClusterRule(Optimizer* opt,
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
case EN::SUBQUERY:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
// do break
stopSearching = true;
break;
@ -4484,9 +4470,7 @@ void arangodb::aql::distributeSortToClusterRule(Optimizer* opt,
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
case EN::REMOTESINGLE:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
// For all these, we do not want to pull a SortNode further down
// out to the DBservers, note that potential FilterNodes and
@ -5001,9 +4985,7 @@ class RemoveToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
}
case EN::SINGLETON:
case EN::ENUMERATE_LIST:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
case EN::SUBQUERY:
case EN::COLLECT:
case EN::INSERT:
@ -5674,9 +5656,7 @@ void arangodb::aql::patchUpdateStatementsRule(Optimizer* opt,
auto const type = dep->getType();
if (type == EN::ENUMERATE_LIST ||
#ifdef USE_IRESEARCH
type == EN::ENUMERATE_IRESEARCH_VIEW ||
#endif
type == EN::SUBQUERY) {
// not suitable
modified = false;

View File

@ -27,10 +27,7 @@
#include "OptimizerRulesFeature.h"
#include "StorageEngine/EngineSelectorFeature.h"
#include "StorageEngine/StorageEngine.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewOptimizerRules.h"
#endif
#include <velocypack/StringRef.h>
@ -273,12 +270,10 @@ void OptimizerRulesFeature::addRules() {
registerRule("replace-function-with-index", replaceNearWithinFulltext,
OptimizerRule::replaceNearWithinFulltext,
DoesNotCreateAdditionalPlans, CanNotBeDisabled);
#ifdef USE_IRESEARCH
// move filters and sort conditions into views
registerRule("handle-arangosearch-views", arangodb::iresearch::handleViewsRule,
OptimizerRule::handleArangoSearchViewsRule,
DoesNotCreateAdditionalPlans, CanNotBeDisabled);
#endif
// remove FILTER DISTANCE(...) and SORT DISTANCE(...)
OptimizerRulesFeature::registerRule("geo-index-optimizer", geoIndexRule,
@ -339,13 +334,11 @@ void OptimizerRulesFeature::addRules() {
DoesNotCreateAdditionalPlans, CanBeDisabled);
#endif
#ifdef USE_IRESEARCH
// distribute view queries in cluster
registerRule("scatter-arangosearch-view-in-cluster",
arangodb::iresearch::scatterViewInClusterRule,
OptimizerRule::scatterIResearchViewInClusterRule,
DoesNotCreateAdditionalPlans, CanNotBeDisabled);
#endif
registerRule("restrict-to-single-shard", restrictToSingleShardRule,
OptimizerRule::restrictToSingleShardRule,

View File

@ -38,10 +38,8 @@ std::string const ConstrainedHeap = "constrained-heap";
std::string const Standard = "standard";
} // namespace
#ifdef USE_IRESEARCH
#include "IResearch/IResearchViewNode.h"
#include "IResearch/IResearchOrderFactory.h"
#endif
using namespace arangodb::basics;
using namespace arangodb::aql;

View File

@ -513,9 +513,7 @@ bool TraversalConditionFinder::before(ExecutionNode* en) {
case EN::ENUMERATE_COLLECTION:
case EN::LIMIT:
case EN::SHORTEST_PATH:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
{
// in these cases we simply ignore the intermediate nodes, note
// that we have taken care of nodes that could throw exceptions

View File

@ -45,74 +45,70 @@ endif ()
## IResearch
################################################################################
if (USE_IRESEARCH)
find_package(IResearch REQUIRED)
find_package(IResearch REQUIRED)
add_library(${LIB_ARANGO_IRESEARCH}
STATIC
IResearch/ApplicationServerHelper.h IResearch/ApplicationServerHelper.cpp
IResearch/Containers.cpp IResearch/Containers.h
IResearch/IResearchAnalyzerFeature.cpp IResearch/IResearchAnalyzerFeature.h
IResearch/IResearchCommon.cpp IResearch/IResearchCommon.h
IResearch/IResearchKludge.cpp IResearch/IResearchKludge.h
IResearch/IResearchLink.cpp IResearch/IResearchLink.h
IResearch/IResearchLinkCoordinator.cpp IResearch/IResearchLinkCoordinator.h
IResearch/IResearchLinkHelper.cpp IResearch/IResearchLinkHelper.h
IResearch/IResearchLinkMeta.cpp IResearch/IResearchLinkMeta.h
IResearch/IResearchMMFilesLink.cpp IResearch/IResearchMMFilesLink.h
IResearch/IResearchRocksDBLink.cpp IResearch/IResearchRocksDBLink.h
IResearch/IResearchRocksDBRecoveryHelper.cpp
IResearch/IResearchRocksDBRecoveryHelper.h
IResearch/IResearchView.cpp IResearch/IResearchView.h
IResearch/IResearchViewCoordinator.cpp IResearch/IResearchViewCoordinator.h
IResearch/IResearchViewOptimizerRules.cpp IResearch/IResearchViewOptimizerRules.h
IResearch/IResearchViewNode.cpp IResearch/IResearchViewNode.h
IResearch/IResearchViewBlock.cpp IResearch/IResearchViewBlock.h
IResearch/IResearchExpressionContext.cpp IResearch/IResearchExpressionContext.h
IResearch/IResearchViewMeta.cpp IResearch/IResearchViewMeta.h
IResearch/IResearchFeature.cpp IResearch/IResearchFeature.h
IResearch/IResearchDocument.cpp IResearch/IResearchDocument.h
IResearch/IResearchPrimaryKeyFilter.cpp IResearch/IResearchPrimaryKeyFilter.h
IResearch/IResearchFilterFactory.cpp IResearch/IResearchFilterFactory.h
IResearch/IResearchOrderFactory.cpp IResearch/IResearchOrderFactory.h
IResearch/VelocyPackHelper.cpp IResearch/VelocyPackHelper.h
IResearch/ExpressionFilter.cpp IResearch/ExpressionFilter.h
IResearch/AqlHelper.cpp IResearch/AqlHelper.h
)
add_library(${LIB_ARANGO_IRESEARCH}
STATIC
IResearch/ApplicationServerHelper.h IResearch/ApplicationServerHelper.cpp
IResearch/Containers.cpp IResearch/Containers.h
IResearch/IResearchAnalyzerFeature.cpp IResearch/IResearchAnalyzerFeature.h
IResearch/IResearchCommon.cpp IResearch/IResearchCommon.h
IResearch/IResearchKludge.cpp IResearch/IResearchKludge.h
IResearch/IResearchLink.cpp IResearch/IResearchLink.h
IResearch/IResearchLinkCoordinator.cpp IResearch/IResearchLinkCoordinator.h
IResearch/IResearchLinkHelper.cpp IResearch/IResearchLinkHelper.h
IResearch/IResearchLinkMeta.cpp IResearch/IResearchLinkMeta.h
IResearch/IResearchMMFilesLink.cpp IResearch/IResearchMMFilesLink.h
IResearch/IResearchRocksDBLink.cpp IResearch/IResearchRocksDBLink.h
IResearch/IResearchRocksDBRecoveryHelper.cpp
IResearch/IResearchRocksDBRecoveryHelper.h
IResearch/IResearchView.cpp IResearch/IResearchView.h
IResearch/IResearchViewCoordinator.cpp IResearch/IResearchViewCoordinator.h
IResearch/IResearchViewOptimizerRules.cpp IResearch/IResearchViewOptimizerRules.h
IResearch/IResearchViewNode.cpp IResearch/IResearchViewNode.h
IResearch/IResearchViewBlock.cpp IResearch/IResearchViewBlock.h
IResearch/IResearchExpressionContext.cpp IResearch/IResearchExpressionContext.h
IResearch/IResearchViewMeta.cpp IResearch/IResearchViewMeta.h
IResearch/IResearchFeature.cpp IResearch/IResearchFeature.h
IResearch/IResearchDocument.cpp IResearch/IResearchDocument.h
IResearch/IResearchPrimaryKeyFilter.cpp IResearch/IResearchPrimaryKeyFilter.h
IResearch/IResearchFilterFactory.cpp IResearch/IResearchFilterFactory.h
IResearch/IResearchOrderFactory.cpp IResearch/IResearchOrderFactory.h
IResearch/VelocyPackHelper.cpp IResearch/VelocyPackHelper.h
IResearch/ExpressionFilter.cpp IResearch/ExpressionFilter.h
IResearch/AqlHelper.cpp IResearch/AqlHelper.h
)
target_compile_definitions(${LIB_ARANGO_IRESEARCH}
PUBLIC "$<$<CONFIG:Debug>:IRESEARCH_DEBUG=1>"
)
target_compile_definitions(${LIB_ARANGO_IRESEARCH}
PUBLIC "$<$<CONFIG:Debug>:IRESEARCH_DEBUG=1>"
)
target_include_directories(${LIB_ARANGO_IRESEARCH}
PUBLIC ${IRESEARCH_INCLUDE}
)
if (USE_ENTERPRISE)
target_include_directories(${LIB_ARANGO_IRESEARCH}
PUBLIC ${IRESEARCH_INCLUDE}
PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}"
)
endif()
if (USE_ENTERPRISE)
target_include_directories(${LIB_ARANGO_IRESEARCH}
PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}"
)
endif()
if(MSVC)
set(IRESEARCH_TARGET_DEPENDENCY iresearch-static-scrt) # use static + staticCRT to match ArangoDB
else()
set(IRESEARCH_TARGET_DEPENDENCY iresearch-static) # use static to match ArangoDB
endif()
target_link_libraries(${LIB_ARANGO_IRESEARCH}
${IRESEARCH_TARGET_DEPENDENCY}
s2 # needed for some includes
boost_locale # required by iResearch
)
add_dependencies(${LIB_ARANGO_IRESEARCH}
${IRESEARCH_TARGET_DEPENDENCY}
v8_build # for ICU required by iResearch
)
if(MSVC)
set(IRESEARCH_TARGET_DEPENDENCY iresearch-static-scrt) # use static + staticCRT to match ArangoDB
else()
set(LIB_ARANGO_IRESEARCH "")
endif ()
set(IRESEARCH_TARGET_DEPENDENCY iresearch-static) # use static to match ArangoDB
endif()
target_link_libraries(${LIB_ARANGO_IRESEARCH}
${IRESEARCH_TARGET_DEPENDENCY}
s2 # needed for some includes
boost_locale # required by iResearch
)
add_dependencies(${LIB_ARANGO_IRESEARCH}
${IRESEARCH_TARGET_DEPENDENCY}
v8_build # for ICU required by iResearch
)
################################################################################
## arangod

View File

@ -243,9 +243,7 @@ bool ClusterIndex::supportsFilterCondition(
case TRI_IDX_TYPE_GEO1_INDEX:
case TRI_IDX_TYPE_GEO2_INDEX:
case TRI_IDX_TYPE_FULLTEXT_INDEX:
#ifdef USE_IRESEARCH
case TRI_IDX_TYPE_IRESEARCH_LINK:
#endif
case TRI_IDX_TYPE_NO_ACCESS_INDEX: {
// should not be called for these indexes
return Index::supportsFilterCondition(allIndexes, node, reference, itemsInIndex,
@ -315,9 +313,7 @@ bool ClusterIndex::supportsSortCondition(arangodb::aql::SortCondition const* sor
case TRI_IDX_TYPE_GEO1_INDEX:
case TRI_IDX_TYPE_GEO2_INDEX:
case TRI_IDX_TYPE_FULLTEXT_INDEX:
#ifdef USE_IRESEARCH
case TRI_IDX_TYPE_IRESEARCH_LINK:
#endif
case TRI_IDX_TYPE_NO_ACCESS_INDEX:
case TRI_IDX_TYPE_EDGE_INDEX: {
return Index::supportsSortCondition(sortCondition, reference, itemsInIndex,
@ -365,9 +361,7 @@ aql::AstNode* ClusterIndex::specializeCondition(aql::AstNode* node,
case TRI_IDX_TYPE_GEO1_INDEX:
case TRI_IDX_TYPE_GEO2_INDEX:
case TRI_IDX_TYPE_FULLTEXT_INDEX:
#ifdef USE_IRESEARCH
case TRI_IDX_TYPE_IRESEARCH_LINK:
#endif
case TRI_IDX_TYPE_NO_ACCESS_INDEX: {
return Index::specializeCondition(node, reference); // unsupported
}

View File

@ -32,11 +32,7 @@
#include "Basics/datetime.h"
#include "Cluster/ServerState.h"
#include "Index.h"
#ifdef USE_IRESEARCH
#include "IResearch/IResearchCommon.h"
#endif
#include "StorageEngine/EngineSelectorFeature.h"
#include "StorageEngine/StorageEngine.h"
#include "VocBase/LogicalCollection.h"
@ -297,12 +293,10 @@ Index::IndexType Index::type(char const* type, size_t len) {
if (::typeMatch(type, len, "geo2")) {
return TRI_IDX_TYPE_GEO2_INDEX;
}
#ifdef USE_IRESEARCH
std::string const& tmp = arangodb::iresearch::DATA_SOURCE_TYPE.name();
if (::typeMatch(type, len, tmp.c_str())) {
return TRI_IDX_TYPE_IRESEARCH_LINK;
}
#endif
if (::typeMatch(type, len, "noaccess")) {
return TRI_IDX_TYPE_NO_ACCESS_INDEX;
}
@ -337,10 +331,8 @@ char const* Index::oldtypeName(Index::IndexType type) {
return "geo2";
case TRI_IDX_TYPE_GEO_INDEX:
return "geo";
#ifdef USE_IRESEARCH
case TRI_IDX_TYPE_IRESEARCH_LINK:
return arangodb::iresearch::DATA_SOURCE_TYPE.name().c_str();
#endif
case TRI_IDX_TYPE_NO_ACCESS_INDEX:
return "noaccess";
case TRI_IDX_TYPE_UNKNOWN: {

View File

@ -100,9 +100,7 @@ class Index {
TRI_IDX_TYPE_SKIPLIST_INDEX,
TRI_IDX_TYPE_TTL_INDEX,
TRI_IDX_TYPE_PERSISTENT_INDEX,
#ifdef USE_IRESEARCH
TRI_IDX_TYPE_IRESEARCH_LINK,
#endif
TRI_IDX_TYPE_NO_ACCESS_INDEX
};

View File

@ -46,9 +46,7 @@
#include <velocypack/StringRef.h>
#include <velocypack/velocypack-aliases.h>
#ifdef USE_IRESEARCH
#include "IResearch/IResearchMMFilesLink.h"
#endif
using namespace arangodb;

View File

@ -113,9 +113,7 @@ void MMFilesOptimizerRules::removeSortRandRule(Optimizer* opt,
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
case EN::INDEX:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
{
// if we found another SortNode, a CollectNode, FilterNode, a
// SubqueryNode, an EnumerateListNode, a TraversalNode or an IndexNode

View File

@ -112,10 +112,8 @@
#include "Enterprise/RestServer/arangodEE.h"
#endif
#ifdef USE_IRESEARCH
#include "IResearch/IResearchAnalyzerFeature.h"
#include "IResearch/IResearchFeature.h"
#endif
// storage engines
#include "ClusterEngine/ClusterEngine.h"
@ -240,10 +238,8 @@ static int runServer(int argc, char** argv, ArangoGlobalContext& context) {
server.addFeature(new SslServerFeature(server));
#endif
#ifdef USE_IRESEARCH
server.addFeature(new arangodb::iresearch::IResearchAnalyzerFeature(server));
server.addFeature(new arangodb::iresearch::IResearchFeature(server));
#endif
// storage engines
server.addFeature(new ClusterEngine(server));

View File

@ -324,10 +324,8 @@ RocksDBKeyBounds RocksDBIndex::getBounds(Index::IndexType type, uint64_t objectI
return RocksDBKeyBounds::LegacyGeoIndex(objectId);
case RocksDBIndex::TRI_IDX_TYPE_GEO_INDEX:
return RocksDBKeyBounds::GeoIndex(objectId);
#ifdef USE_IRESEARCH
case RocksDBIndex::TRI_IDX_TYPE_IRESEARCH_LINK:
return RocksDBKeyBounds::DatabaseViews(objectId);
#endif
case RocksDBIndex::TRI_IDX_TYPE_UNKNOWN:
default:
THROW_ARANGO_EXCEPTION(TRI_ERROR_NOT_IMPLEMENTED);

View File

@ -45,9 +45,7 @@
#include <velocypack/Slice.h>
#include <velocypack/velocypack-aliases.h>
#ifdef USE_IRESEARCH
#include "IResearch/IResearchRocksDBLink.h"
#endif
using namespace arangodb;

View File

@ -321,9 +321,7 @@ void RocksDBOptimizerRules::removeSortRandRule(Optimizer* opt,
case EN::TRAVERSAL:
case EN::SHORTEST_PATH:
case EN::INDEX:
#ifdef USE_IRESEARCH
case EN::ENUMERATE_IRESEARCH_VIEW:
#endif
{
// if we found another SortNode, a CollectNode, FilterNode, a
// SubqueryNode, an EnumerateListNode, a TraversalNode or an IndexNode

View File

@ -46,9 +46,7 @@
#include "Basics/build-repository.h"
#include "Basics/conversions.h"
#ifdef USE_IRESEARCH
#include "3rdParty/iresearch/core/utils/version_defines.hpp"
#endif
using namespace arangodb::rest;
@ -212,9 +210,7 @@ void Version::initialize() {
Values["fd-client-event-handler"] = "select";
#endif
#ifdef USE_IRESEARCH
Values["iresearch-version"] = getIResearchVersion();
#endif
for (auto& it : Values) {
arangodb::basics::StringUtils::trimInPlace(it.second);
@ -350,13 +346,9 @@ std::string Version::getICUVersion() {
return icuVersionString;
}
#ifdef USE_IRESEARCH
/// @brief get IResearch version
std::string Version::getIResearchVersion() { return IResearch_version; }
#endif
/// @brief get compiler
std::string Version::getCompiler() {
#if defined(__clang__)

View File

@ -119,10 +119,8 @@ class Version {
/// @brief get ICU version
static std::string getICUVersion();
#ifdef USE_IRESEARCH
/// @brief get IResearch version
static std::string getIResearchVersion();
#endif
/// @brief get compiler
static std::string getCompiler();

View File

@ -82,11 +82,7 @@ SCENARIO("SortExecutor", "[AQL][EXECUTOR]") {
std::vector<SortRegister> sortRegisters;
SortElement sl{&sortVar, true};
#if 0 // #ifdef USE_IRESEARCH
SortRegister sortReg(0, sl, &compareAqlValues);
#else
SortRegister sortReg(0, sl);
#endif
sortRegisters.emplace_back(std::move(sortReg));

160
tests/CMakeLists.txt vendored
View File

@ -8,72 +8,70 @@ endforeach()
## IResearch
################################################################################
if (USE_IRESEARCH)
set(IRESEARCH_TESTS_SOURCES
Cluster/ClusterInfo-test.cpp
IResearch/common.cpp
IResearch/AgencyMock.cpp
IResearch/AgencyCommManagerMock.cpp
IResearch/ClusterCommMock.cpp IResearch/ClusterCommMock.h
IResearch/Containers-test.cpp
IResearch/ExpressionFilter-test.cpp
IResearch/ExecutionBlockMock.cpp
IResearch/ExecutionBlockMock-test.cpp
IResearch/ExpressionContextMock.cpp
IResearch/IResearchAnalyzerFeature-test.cpp
IResearch/IResearchFeature-test.cpp
IResearch/IResearchOrder-test.cpp
IResearch/IResearchView-test.cpp
IResearch/IResearchViewCoordinator-test.cpp
IResearch/IResearchViewDBServer-test.cpp
IResearch/IResearchViewMeta-test.cpp
IResearch/IResearchDocument-test.cpp
IResearch/IResearchFilter-test.cpp
IResearch/IResearchFilterFunction-test.cpp
IResearch/IResearchFilterBoolean-test.cpp
IResearch/IResearchFilterCompare-test.cpp
IResearch/IResearchFilterIn-test.cpp
IResearch/IResearchIndex-test.cpp
IResearch/IResearchLink-test.cpp
IResearch/IResearchLinkCoordinator-test.cpp
IResearch/IResearchLinkHelper-test.cpp
IResearch/IResearchLinkMeta-test.cpp
IResearch/IResearchQuery-test.cpp
IResearch/IResearchQueryAnd-test.cpp
IResearch/IResearchQueryBooleanTerm-test.cpp
IResearch/IResearchQueryComplexBoolean-test.cpp
IResearch/IResearchQueryExists-test.cpp
IResearch/IResearchQueryIn-test.cpp
IResearch/IResearchQueryNullTerm-test.cpp
IResearch/IResearchQueryNumericTerm-test.cpp
IResearch/IResearchQueryOr-test.cpp
IResearch/IResearchQueryOptimization-test.cpp
IResearch/IResearchQueryPhrase-test.cpp
IResearch/IResearchQueryScorer-test.cpp
IResearch/IResearchQuerySelectAll-test.cpp
IResearch/IResearchQueryStartsWith-test.cpp
IResearch/IResearchQueryInRange-test.cpp
IResearch/IResearchQueryStringTerm-test.cpp
IResearch/IResearchQueryTokens-test.cpp
IResearch/IResearchQueryValue-test.cpp
IResearch/IResearchQueryJoin-test.cpp
IResearch/IResearchQueryAggregate-test.cpp
IResearch/IResearchQueryTraversal-test.cpp
IResearch/IResearchQueryOptions-test.cpp
IResearch/RestHandlerMock.cpp
IResearch/IResearchViewNode-test.cpp
IResearch/VelocyPackHelper-test.cpp
RestHandler/RestUsersHandler-test.cpp
RestHandler/RestViewHandler-test.cpp
RestServer/FlushFeature-test.cpp
Utils/CollectionNameResolver-test.cpp
V8Server/v8-users-test.cpp
V8Server/v8-views-test.cpp
VocBase/LogicalDataSource-test.cpp
VocBase/LogicalView-test.cpp
VocBase/vocbase-test.cpp
)
endif ()
set(IRESEARCH_TESTS_SOURCES
Cluster/ClusterInfo-test.cpp
IResearch/common.cpp
IResearch/AgencyMock.cpp
IResearch/AgencyCommManagerMock.cpp
IResearch/ClusterCommMock.cpp IResearch/ClusterCommMock.h
IResearch/Containers-test.cpp
IResearch/ExpressionFilter-test.cpp
IResearch/ExecutionBlockMock.cpp
IResearch/ExecutionBlockMock-test.cpp
IResearch/ExpressionContextMock.cpp
IResearch/IResearchAnalyzerFeature-test.cpp
IResearch/IResearchFeature-test.cpp
IResearch/IResearchOrder-test.cpp
IResearch/IResearchView-test.cpp
IResearch/IResearchViewCoordinator-test.cpp
IResearch/IResearchViewDBServer-test.cpp
IResearch/IResearchViewMeta-test.cpp
IResearch/IResearchDocument-test.cpp
IResearch/IResearchFilter-test.cpp
IResearch/IResearchFilterFunction-test.cpp
IResearch/IResearchFilterBoolean-test.cpp
IResearch/IResearchFilterCompare-test.cpp
IResearch/IResearchFilterIn-test.cpp
IResearch/IResearchIndex-test.cpp
IResearch/IResearchLink-test.cpp
IResearch/IResearchLinkCoordinator-test.cpp
IResearch/IResearchLinkHelper-test.cpp
IResearch/IResearchLinkMeta-test.cpp
IResearch/IResearchQuery-test.cpp
IResearch/IResearchQueryAnd-test.cpp
IResearch/IResearchQueryBooleanTerm-test.cpp
IResearch/IResearchQueryComplexBoolean-test.cpp
IResearch/IResearchQueryExists-test.cpp
IResearch/IResearchQueryIn-test.cpp
IResearch/IResearchQueryNullTerm-test.cpp
IResearch/IResearchQueryNumericTerm-test.cpp
IResearch/IResearchQueryOr-test.cpp
IResearch/IResearchQueryOptimization-test.cpp
IResearch/IResearchQueryPhrase-test.cpp
IResearch/IResearchQueryScorer-test.cpp
IResearch/IResearchQuerySelectAll-test.cpp
IResearch/IResearchQueryStartsWith-test.cpp
IResearch/IResearchQueryInRange-test.cpp
IResearch/IResearchQueryStringTerm-test.cpp
IResearch/IResearchQueryTokens-test.cpp
IResearch/IResearchQueryValue-test.cpp
IResearch/IResearchQueryJoin-test.cpp
IResearch/IResearchQueryAggregate-test.cpp
IResearch/IResearchQueryTraversal-test.cpp
IResearch/IResearchQueryOptions-test.cpp
IResearch/RestHandlerMock.cpp
IResearch/IResearchViewNode-test.cpp
IResearch/VelocyPackHelper-test.cpp
RestHandler/RestUsersHandler-test.cpp
RestHandler/RestViewHandler-test.cpp
RestServer/FlushFeature-test.cpp
Utils/CollectionNameResolver-test.cpp
V8Server/v8-users-test.cpp
V8Server/v8-views-test.cpp
VocBase/LogicalDataSource-test.cpp
VocBase/LogicalView-test.cpp
VocBase/vocbase-test.cpp
)
set(ARANGODB_TESTS_SOURCES
Agency/ActiveFailoverTest.cpp
@ -234,20 +232,18 @@ target_include_directories(arangodbtests SYSTEM PRIVATE
${CMAKE_SOURCE_DIR}/3rdParty/fakeit
)
if (USE_IRESEARCH)
find_package(OpenSSL REQUIRED)
list(APPEND IRESEARCH_LIB_RESOURCES
"${LIB_EAY_DEBUG_DLL}"
"${SSL_EAY_DEBUG_DLL}"
"${LIB_EAY_RELEASE_DLL}"
"${SSL_EAY_RELEASE_DLL}"
)
find_package(OpenSSL REQUIRED)
list(APPEND IRESEARCH_LIB_RESOURCES
"${LIB_EAY_DEBUG_DLL}"
"${SSL_EAY_DEBUG_DLL}"
"${LIB_EAY_RELEASE_DLL}"
"${SSL_EAY_RELEASE_DLL}"
)
foreach(ELEMENT ${IRESEARCH_LIB_RESOURCES})
add_custom_command(
TARGET arangodbtests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "copying library resource:" "${ELEMENT}" " -> " "$<TARGET_FILE_DIR:arangodbtests>"
COMMAND cp -lf ${ELEMENT} $<TARGET_FILE_DIR:arangodbtests> || ${CMAKE_COMMAND} -E copy ${ELEMENT} $<TARGET_FILE_DIR:arangodbtests>
)
endforeach()
endif()
foreach(ELEMENT ${IRESEARCH_LIB_RESOURCES})
add_custom_command(
TARGET arangodbtests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "copying library resource:" "${ELEMENT}" " -> " "$<TARGET_FILE_DIR:arangodbtests>"
COMMAND cp -lf ${ELEMENT} $<TARGET_FILE_DIR:arangodbtests> || ${CMAKE_COMMAND} -E copy ${ELEMENT} $<TARGET_FILE_DIR:arangodbtests>
)
endforeach()

View File

@ -484,7 +484,6 @@ std::shared_ptr<arangodb::Index> PhysicalCollectionMock::createIndex(
if (0 == type.compare("edge")) {
index = EdgeIndexMock::make(id, _logicalCollection, info);
#ifdef USE_IRESEARCH
} else if (0 == type.compare(arangodb::iresearch::DATA_SOURCE_TYPE.name())) {
if (arangodb::ServerState::instance()->isCoordinator()) {
arangodb::iresearch::IResearchLinkCoordinator::factory().instantiate(index, _logicalCollection,
@ -493,7 +492,6 @@ std::shared_ptr<arangodb::Index> PhysicalCollectionMock::createIndex(
arangodb::iresearch::IResearchMMFilesLink::factory().instantiate(index, _logicalCollection,
info, id, false);
}
#endif
}
if (!index) {