diff --git a/UnitTests/HttpInterface/api-index-geo-spec-mmfiles.rb b/UnitTests/HttpInterface/api-index-geo-spec.rb similarity index 100% rename from UnitTests/HttpInterface/api-index-geo-spec-mmfiles.rb rename to UnitTests/HttpInterface/api-index-geo-spec.rb diff --git a/arangod/Cache/Metadata.cpp b/arangod/Cache/Metadata.cpp index 92b01e1281..89b6f8be48 100644 --- a/arangod/Cache/Metadata.cpp +++ b/arangod/Cache/Metadata.cpp @@ -31,8 +31,6 @@ #include #include -#include // TODO - using namespace arangodb::cache; Metadata::Metadata() diff --git a/arangod/GeneralServer/RestEngine.cpp b/arangod/GeneralServer/RestEngine.cpp index abbda2dd27..00f784e9de 100644 --- a/arangod/GeneralServer/RestEngine.cpp +++ b/arangod/GeneralServer/RestEngine.cpp @@ -22,7 +22,6 @@ #include "RestEngine.h" -#include #include "GeneralServer/RestHandler.h" #include "Logger/Logger.h" diff --git a/arangod/MMFiles/MMFilesFulltextIndex.cpp b/arangod/MMFiles/MMFilesFulltextIndex.cpp index 05f9a1f7f0..6bf9bfca3a 100644 --- a/arangod/MMFiles/MMFilesFulltextIndex.cpp +++ b/arangod/MMFiles/MMFilesFulltextIndex.cpp @@ -114,8 +114,6 @@ MMFilesFulltextIndex::MMFilesFulltextIndex(TRI_idx_iid_t iid, } } - - MMFilesFulltextIndex::~MMFilesFulltextIndex() { if (_fulltextIndex != nullptr) { LOG_TOPIC(TRACE, arangodb::Logger::FIXME) << "destroying fulltext index"; diff --git a/arangod/MMFiles/MMFilesIndexFactory.cpp b/arangod/MMFiles/MMFilesIndexFactory.cpp index c851e2f3e8..e677444b04 100644 --- a/arangod/MMFiles/MMFilesIndexFactory.cpp +++ b/arangod/MMFiles/MMFilesIndexFactory.cpp @@ -170,9 +170,13 @@ static int EnhanceJsonIndexPersistent(VPackSlice const definition, static void ProcessIndexGeoJsonFlag(VPackSlice const definition, VPackBuilder& builder) { - bool geoJson = - basics::VelocyPackHelper::getBooleanValue(definition, "geoJson", false); - builder.add("geoJson", VPackValue(geoJson)); + VPackSlice fieldsSlice = definition.get("fields"); + if (fieldsSlice.isArray() && fieldsSlice.length() == 1) { + // only add geoJson for indexes with a single field (with needs to be an array) + bool geoJson = + basics::VelocyPackHelper::getBooleanValue(definition, "geoJson", false); + builder.add("geoJson", VPackValue(geoJson)); + } } //////////////////////////////////////////////////////////////////////////////// @@ -221,6 +225,10 @@ static int EnhanceJsonIndexFulltext(VPackSlice const definition, VPackBuilder& builder, bool create) { int res = ProcessIndexFields(definition, builder, 1, create); if (res == TRI_ERROR_NO_ERROR) { + // hard-coded defaults + builder.add("sparse", VPackValue(true)); + builder.add("unique", VPackValue(false)); + // handle "minLength" attribute int minWordLength = TRI_FULLTEXT_MIN_WORD_LENGTH_DEFAULT; VPackSlice minLength = definition.get("minLength"); diff --git a/arangod/RestServer/AqlFeature.cpp b/arangod/RestServer/AqlFeature.cpp index 39fe443e40..8ab4b191c7 100644 --- a/arangod/RestServer/AqlFeature.cpp +++ b/arangod/RestServer/AqlFeature.cpp @@ -84,11 +84,16 @@ void AqlFeature::stop() { _isStopped = true; // prevent new AQL queries from being launched } LOG_TOPIC(DEBUG, Logger::QUERIES) << "AQL feature stopped"; - QueryRegistryFeature::QUERY_REGISTRY->destroyAll(); - TraverserEngineRegistryFeature::TRAVERSER_ENGINE_REGISTRY->destroyAll(); // Wait until all AQL queries are done while (true) { + try { + QueryRegistryFeature::QUERY_REGISTRY->destroyAll(); + TraverserEngineRegistryFeature::TRAVERSER_ENGINE_REGISTRY->destroyAll(); + } catch (...) { + // ignore errors here. if it fails, we'll try again in next round + } + size_t m, n, o; { MUTEX_LOCKER(locker, AqlFeature::_aqlFeatureMutex); diff --git a/arangod/RocksDBEngine/RocksDBGeoIndexImpl.cpp b/arangod/RocksDBEngine/RocksDBGeoIndexImpl.cpp index 68c2367b2b..90952c42dd 100644 --- a/arangod/RocksDBEngine/RocksDBGeoIndexImpl.cpp +++ b/arangod/RocksDBEngine/RocksDBGeoIndexImpl.cpp @@ -26,7 +26,6 @@ #define _USE_MATH_DEFINES #include #include -#include #include #include "RocksDBEngine/RocksDBGeoIndexImpl.h" diff --git a/arangod/RocksDBEngine/RocksDBIndexFactory.cpp b/arangod/RocksDBEngine/RocksDBIndexFactory.cpp index 4018caefc8..d8099f9a05 100644 --- a/arangod/RocksDBEngine/RocksDBIndexFactory.cpp +++ b/arangod/RocksDBEngine/RocksDBIndexFactory.cpp @@ -170,9 +170,13 @@ static int EnhanceJsonIndexPersistent(VPackSlice const definition, static void ProcessIndexGeoJsonFlag(VPackSlice const definition, VPackBuilder& builder) { - bool geoJson = - basics::VelocyPackHelper::getBooleanValue(definition, "geoJson", false); - builder.add("geoJson", VPackValue(geoJson)); + VPackSlice fieldsSlice = definition.get("fields"); + if (fieldsSlice.isArray() && fieldsSlice.length() == 1) { + // only add geoJson for indexes with a single field (with needs to be an array) + bool geoJson = + basics::VelocyPackHelper::getBooleanValue(definition, "geoJson", false); + builder.add("geoJson", VPackValue(geoJson)); + } } //////////////////////////////////////////////////////////////////////////////// @@ -222,6 +226,10 @@ static int EnhanceJsonIndexFulltext(VPackSlice const definition, VPackBuilder& builder, bool create) { int res = ProcessIndexFields(definition, builder, 1, create); if (res == TRI_ERROR_NO_ERROR) { + // hard-coded defaults + builder.add("sparse", VPackValue(true)); + builder.add("unique", VPackValue(false)); + // handle "minLength" attribute int minWordLength = TRI_FULLTEXT_MIN_WORD_LENGTH_DEFAULT; VPackSlice minLength = definition.get("minLength"); diff --git a/arangod/V8Server/v8-actions.cpp b/arangod/V8Server/v8-actions.cpp index 6643f6ac66..ad6ef53eb9 100644 --- a/arangod/V8Server/v8-actions.cpp +++ b/arangod/V8Server/v8-actions.cpp @@ -48,8 +48,6 @@ #include "VocBase/ticks.h" #include "VocBase/vocbase.h" -#include - #include #include #include diff --git a/cmake/packages/deb.cmake b/cmake/packages/deb.cmake index 1bf9f6e8c6..9f621e2433 100644 --- a/cmake/packages/deb.cmake +++ b/cmake/packages/deb.cmake @@ -18,7 +18,11 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${ARANGODB_URL_INFO_ABOUT}) set(CPACK_COMPONENTS_ALL debian-extras) set(CPACK_GENERATOR "DEB") -set(CPACK_SYSTEMD_FOUND "${SYSTEMD_FOUND}") +if (SYSTEMD_FOUND) + set(CPACK_SYSTEMD_FOUND "1") +else() + set(CPACK_SYSTEMD_FOUND "0") +endif() # substitute the package name so debconf works: configure_file (