diff --git a/arangod/RocksDBEngine/RocksDBEngine.cpp b/arangod/RocksDBEngine/RocksDBEngine.cpp index a167095839..67b5d10b57 100644 --- a/arangod/RocksDBEngine/RocksDBEngine.cpp +++ b/arangod/RocksDBEngine/RocksDBEngine.cpp @@ -158,7 +158,7 @@ void RocksDBEngine::start() { // options imported set by RocksDBOptionFeature auto* opts = ApplicationServer::getFeature( "RocksDBOption"); - /* + _options.write_buffer_size = static_cast(opts->_writeBufferSize); _options.max_write_buffer_number = static_cast(opts->_maxWriteBufferNumber); @@ -183,7 +183,7 @@ void RocksDBEngine::start() { static_cast(opts->_logFileTimeToRoll); _options.compaction_readahead_size = static_cast(opts->_compactionReadaheadSize); -*/ + _options.create_if_missing = true; _options.max_open_files = -1; _options.comparator = _cmp.get(); diff --git a/cmake/packages/snap.cmake b/cmake/packages/snap.cmake index 9b9230abb3..1e0c4e788e 100644 --- a/cmake/packages/snap.cmake +++ b/cmake/packages/snap.cmake @@ -7,7 +7,7 @@ endif() if(SNAPCRAFT_FOUND) set(SNAPCRAFT_TEMPLATE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Installation/Ubuntu") set(SNAPCRAFT_SOURCE_DIR "${CMAKE_BINARY_DIR}/_CPack_Packages/SNAP") - set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap") + set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap") message(STATUS "Creating snap package") diff --git a/js/server/tests/aql/aql-functions-list.js b/js/server/tests/aql/aql-functions-list.js index 082cada00e..104d3a164f 100644 --- a/js/server/tests/aql/aql-functions-list.js +++ b/js/server/tests/aql/aql-functions-list.js @@ -723,6 +723,7 @@ function ahuacatlListTestSuite () { for (var i = 0; i < 10; ++i) { collection.save({_key: "test" + i}); } + var bindVars = {"@collection" : collectionName}; var actual = getQueryResults("LET tmp = (FOR x IN @@collection RETURN x) RETURN APPEND([], tmp)", bindVars); assertEqual(actual.length, 1); @@ -759,6 +760,9 @@ function ahuacatlListTestSuite () { for (i = 0; i < 10; ++i) { assertEqual(actual[i]._key, "test" + i); } + + actual = getQueryResults("LET doc = DOCUMENT('nonexistantCollection/nonexistantDocument') RETURN append(doc.t,[1,2,2], true)"); + assertEqual(actual[0], [1,2,2]); }, testAppendDocuments2 : function () { diff --git a/lib/ApplicationFeatures/LanguageFeature.cpp b/lib/ApplicationFeatures/LanguageFeature.cpp index b2bf0e9fa7..6802c7d277 100644 --- a/lib/ApplicationFeatures/LanguageFeature.cpp +++ b/lib/ApplicationFeatures/LanguageFeature.cpp @@ -69,7 +69,9 @@ void* LanguageFeature::prepareIcu(std::string const& binaryPath, std::string con if (path.empty() || !TRI_IsRegularFile(path.c_str())) { if (!path.empty()) { - LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "failed to locate '" << fn << "' at '"<< path << "'"; + LOG_TOPIC(WARN, arangodb::Logger::FIXME) + << "failed to locate '" << fn + << "' at '"<< path << "'"; } std::string bpfn = binaryExecutionPath + TRI_DIR_SEPARATOR_STR + fn; @@ -83,6 +85,10 @@ void* LanguageFeature::prepareIcu(std::string const& binaryPath, std::string con std::string argv_0 = binaryExecutionPath + TRI_DIR_SEPARATOR_STR + binaryName; path = TRI_LocateInstallDirectory(argv_0.c_str(), binaryPath.c_str()); path += ICU_DESTINATION_DIRECTORY TRI_DIR_SEPARATOR_STR + fn; + if (!TRI_IsRegularFile(path.c_str())) { + // Try whether we have an absolute install prefix: + path = ICU_DESTINATION_DIRECTORY TRI_DIR_SEPARATOR_STR + fn; + } } if (!TRI_IsRegularFile(path.c_str())) { std::string msg = diff --git a/lib/ApplicationFeatures/RocksDBOptionFeature.cpp b/lib/ApplicationFeatures/RocksDBOptionFeature.cpp index 84233a9120..80ac5a8d3c 100644 --- a/lib/ApplicationFeatures/RocksDBOptionFeature.cpp +++ b/lib/ApplicationFeatures/RocksDBOptionFeature.cpp @@ -30,28 +30,34 @@ #include "ProgramOptions/Section.h" #include "RestServer/DatabasePathFeature.h" +#include + using namespace arangodb; using namespace arangodb::application_features; using namespace arangodb::options; + +namespace { +rocksdb::Options rocksDBDefaults; +} RocksDBOptionFeature::RocksDBOptionFeature( application_features::ApplicationServer* server) : application_features::ApplicationFeature(server, "RocksDBOption"), - _writeBufferSize(0), - _maxWriteBufferNumber(2), - _delayedWriteRate(2 * 1024 * 1024), - _minWriteBufferNumberToMerge(1), - _numLevels(4), - _maxBytesForLevelBase(256 * 1024 * 1024), - _maxBytesForLevelMultiplier(10), - _baseBackgroundCompactions(1), - _maxBackgroundCompactions(1), - _maxLogFileSize(0), - _keepLogFileNum(1000), - _logFileTimeToRoll(0), - _compactionReadaheadSize(0), - _verifyChecksumsInCompaction(true), - _optimizeFiltersForHits(true) { + _writeBufferSize(rocksDBDefaults.write_buffer_size), + _maxWriteBufferNumber(rocksDBDefaults.max_write_buffer_number), + _delayedWriteRate(rocksDBDefaults.delayed_write_rate), + _minWriteBufferNumberToMerge(rocksDBDefaults.min_write_buffer_number_to_merge), + _numLevels(rocksDBDefaults.num_levels), + _maxBytesForLevelBase(rocksDBDefaults.max_bytes_for_level_base), + _maxBytesForLevelMultiplier(rocksDBDefaults.max_bytes_for_level_multiplier), + _baseBackgroundCompactions(rocksDBDefaults.base_background_compactions), + _maxBackgroundCompactions(rocksDBDefaults.max_background_compactions), + _maxLogFileSize(rocksDBDefaults.max_log_file_size), + _keepLogFileNum(rocksDBDefaults.keep_log_file_num), + _logFileTimeToRoll(rocksDBDefaults.log_file_time_to_roll), + _compactionReadaheadSize(rocksDBDefaults.compaction_readahead_size), + _verifyChecksumsInCompaction(rocksDBDefaults.verify_checksums_in_compaction), + _optimizeFiltersForHits(rocksDBDefaults.optimize_filters_for_hits) { setOptional(true); requiresElevatedPrivileges(false); startsAfter("DatabasePath");