mirror of https://gitee.com/bigwinds/arangodb
fix MSVC compile warnings
This commit is contained in:
parent
0a9fb050e9
commit
2e3d704d10
|
@ -205,6 +205,7 @@ void RocksDBEngine::start() {
|
||||||
// WAL_ttl_seconds needs to be bigger than the sync interval of the count
|
// WAL_ttl_seconds needs to be bigger than the sync interval of the count
|
||||||
// manager. Should be several times bigger counter_sync_seconds
|
// manager. Should be several times bigger counter_sync_seconds
|
||||||
_options.WAL_ttl_seconds = 600; //(uint64_t)(counter_sync_seconds * 2.0);
|
_options.WAL_ttl_seconds = 600; //(uint64_t)(counter_sync_seconds * 2.0);
|
||||||
|
_options.WAL_size_limit_MB = 0;
|
||||||
double counter_sync_seconds = 2.5;
|
double counter_sync_seconds = 2.5;
|
||||||
// TODO: prefix_extractior + memtable_insert_with_hint_prefix
|
// TODO: prefix_extractior + memtable_insert_with_hint_prefix
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,7 @@ arangodb::Result RocksDBReplicationContext::dumpKeys(
|
||||||
try {
|
try {
|
||||||
_hasMore = primary->nextWithKey(cb, chunkSize);
|
_hasMore = primary->nextWithKey(cb, chunkSize);
|
||||||
_lastIteratorOffset++;
|
_lastIteratorOffset++;
|
||||||
} catch (std::exception const& ex) {
|
} catch (std::exception const&) {
|
||||||
return Result(TRI_ERROR_INTERNAL);
|
return Result(TRI_ERROR_INTERNAL);
|
||||||
}
|
}
|
||||||
b.close();
|
b.close();
|
||||||
|
|
|
@ -110,7 +110,7 @@ void RocksDBOptionFeature::collectOptions(std::shared_ptr<ProgramOptions> option
|
||||||
options->addOption(
|
options->addOption(
|
||||||
"--rocksdb.max-bytes-for-level-multiplier",
|
"--rocksdb.max-bytes-for-level-multiplier",
|
||||||
"control maximum total data size for a level",
|
"control maximum total data size for a level",
|
||||||
new UInt64Parameter(&_maxBytesForLevelMultiplier));
|
new DoubleParameter(&_maxBytesForLevelMultiplier));
|
||||||
|
|
||||||
options->addHiddenOption(
|
options->addHiddenOption(
|
||||||
"--rocksdb.verify-checksums-in-compation",
|
"--rocksdb.verify-checksums-in-compation",
|
||||||
|
@ -188,7 +188,7 @@ void RocksDBOptionFeature::validateOptions(std::shared_ptr<ProgramOptions> optio
|
||||||
LOG_TOPIC(FATAL, arangodb::Logger::FIXME) << "invalid value for '--rocksdb.write-buffer-size'";
|
LOG_TOPIC(FATAL, arangodb::Logger::FIXME) << "invalid value for '--rocksdb.write-buffer-size'";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
if (_maxBytesForLevelMultiplier == 0) {
|
if (_maxBytesForLevelMultiplier <= 0.0) {
|
||||||
LOG_TOPIC(FATAL, arangodb::Logger::FIXME) << "invalid value for '--rocksdb.max-bytes-for-level-multiplier'";
|
LOG_TOPIC(FATAL, arangodb::Logger::FIXME) << "invalid value for '--rocksdb.max-bytes-for-level-multiplier'";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class RocksDBOptionFeature final : public application_features::ApplicationFeatu
|
||||||
uint64_t _minWriteBufferNumberToMerge;
|
uint64_t _minWriteBufferNumberToMerge;
|
||||||
uint64_t _numLevels;
|
uint64_t _numLevels;
|
||||||
uint64_t _maxBytesForLevelBase;
|
uint64_t _maxBytesForLevelBase;
|
||||||
uint64_t _maxBytesForLevelMultiplier;
|
double _maxBytesForLevelMultiplier;
|
||||||
uint64_t _baseBackgroundCompactions;
|
uint64_t _baseBackgroundCompactions;
|
||||||
uint64_t _maxBackgroundCompactions;
|
uint64_t _maxBackgroundCompactions;
|
||||||
uint64_t _maxLogFileSize;
|
uint64_t _maxLogFileSize;
|
||||||
|
|
|
@ -355,7 +355,7 @@ class RandomDeviceMersenne : public RandomDevice {
|
||||||
: engine(RandomDevice::seed()) {}
|
: engine(RandomDevice::seed()) {}
|
||||||
|
|
||||||
uint32_t random() { return engine(); }
|
uint32_t random() { return engine(); }
|
||||||
void seed(uint64_t seed) { engine.seed(seed); }
|
void seed(uint64_t seed) { engine.seed(static_cast<decltype(engine)::result_type>(seed)); }
|
||||||
|
|
||||||
std::mt19937 engine;
|
std::mt19937 engine;
|
||||||
};
|
};
|
||||||
|
@ -595,4 +595,4 @@ void RandomGenerator::seed(uint64_t seed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw std::runtime_error("Random device is not mersenne and cannot be seeded!");
|
throw std::runtime_error("Random device is not mersenne and cannot be seeded!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue