mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'engine-api' of github.com:arangodb/arangodb into engine-api
This commit is contained in:
commit
ac90968c30
|
@ -158,7 +158,7 @@ void RocksDBEngine::start() {
|
|||
// options imported set by RocksDBOptionFeature
|
||||
auto* opts = ApplicationServer::getFeature<arangodb::RocksDBOptionFeature>(
|
||||
"RocksDBOption");
|
||||
/*
|
||||
|
||||
_options.write_buffer_size = static_cast<size_t>(opts->_writeBufferSize);
|
||||
_options.max_write_buffer_number =
|
||||
static_cast<int>(opts->_maxWriteBufferNumber);
|
||||
|
@ -183,7 +183,7 @@ void RocksDBEngine::start() {
|
|||
static_cast<size_t>(opts->_logFileTimeToRoll);
|
||||
_options.compaction_readahead_size =
|
||||
static_cast<size_t>(opts->_compactionReadaheadSize);
|
||||
*/
|
||||
|
||||
_options.create_if_missing = true;
|
||||
_options.max_open_files = -1;
|
||||
_options.comparator = _cmp.get();
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -30,28 +30,34 @@
|
|||
#include "ProgramOptions/Section.h"
|
||||
#include "RestServer/DatabasePathFeature.h"
|
||||
|
||||
#include <rocksdb/options.h>
|
||||
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue