1
0
Fork 0

fix MSVC compile warnings

This commit is contained in:
jsteemann 2017-05-03 15:47:45 +02:00
parent 0a9fb050e9
commit 2e3d704d10
5 changed files with 7 additions and 6 deletions

View File

@ -205,6 +205,7 @@ void RocksDBEngine::start() {
// WAL_ttl_seconds needs to be bigger than the sync interval of the count
// manager. Should be several times bigger counter_sync_seconds
_options.WAL_ttl_seconds = 600; //(uint64_t)(counter_sync_seconds * 2.0);
_options.WAL_size_limit_MB = 0;
double counter_sync_seconds = 2.5;
// TODO: prefix_extractior + memtable_insert_with_hint_prefix

View File

@ -297,7 +297,7 @@ arangodb::Result RocksDBReplicationContext::dumpKeys(
try {
_hasMore = primary->nextWithKey(cb, chunkSize);
_lastIteratorOffset++;
} catch (std::exception const& ex) {
} catch (std::exception const&) {
return Result(TRI_ERROR_INTERNAL);
}
b.close();

View File

@ -110,7 +110,7 @@ void RocksDBOptionFeature::collectOptions(std::shared_ptr<ProgramOptions> option
options->addOption(
"--rocksdb.max-bytes-for-level-multiplier",
"control maximum total data size for a level",
new UInt64Parameter(&_maxBytesForLevelMultiplier));
new DoubleParameter(&_maxBytesForLevelMultiplier));
options->addHiddenOption(
"--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'";
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'";
FATAL_ERROR_EXIT();
}

View File

@ -53,7 +53,7 @@ class RocksDBOptionFeature final : public application_features::ApplicationFeatu
uint64_t _minWriteBufferNumberToMerge;
uint64_t _numLevels;
uint64_t _maxBytesForLevelBase;
uint64_t _maxBytesForLevelMultiplier;
double _maxBytesForLevelMultiplier;
uint64_t _baseBackgroundCompactions;
uint64_t _maxBackgroundCompactions;
uint64_t _maxLogFileSize;

View File

@ -355,7 +355,7 @@ class RandomDeviceMersenne : public RandomDevice {
: engine(RandomDevice::seed()) {}
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;
};
@ -595,4 +595,4 @@ void RandomGenerator::seed(uint64_t seed) {
return;
}
throw std::runtime_error("Random device is not mersenne and cannot be seeded!");
}
}