1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into devel

This commit is contained in:
Simon Grätzer 2017-06-02 13:04:00 +02:00
commit 51ee57a38f
3 changed files with 19 additions and 1 deletions

View File

@ -2382,6 +2382,8 @@ ClusterMethods::persistCollectionInAgency(
}), dbServers.end());
}
std::random_shuffle(dbServers.begin(), dbServers.end());
} else {
dbServers = ci->getCurrentDBServers();
}
// cluster system replicationFactor is 1...allow startup with 1 DBServer.

View File

@ -80,7 +80,7 @@ void ManagedDocumentResult::setManaged(std::string&& str, TRI_voc_rid_t revision
void ManagedDocumentResult::reset() noexcept {
if(_managed) {
delete _vpack;
delete[] _vpack;
}
_managed = false;
_length = 0;

View File

@ -83,6 +83,22 @@ void EnvironmentFeature::prepare() {
} catch (...) {
// file not found or value not convertible into integer
}
try {
std::string value =
basics::FileUtils::slurp("/proc/sys/net/ipv4/tcp_tw_recycle");
uint64_t v = basics::StringUtils::uint64(value);
if (v != 0) {
LOG_TOPIC(WARN, Logger::COMMUNICATION)
<< "/proc/sys/net/ipv4/tcp_tw_recycle is enabled (" << v << ")"
<< "'. This can lead to all sorts of \"random\" network problems. "
<< "It is advised to leave it disabled (should be kernel default)";
LOG_TOPIC(WARN, Logger::COMMUNICATION) << "execute 'sudo bash -c \"echo 0 > "
"/proc/sys/net/ipv4/tcp_tw_recycle\"'";
}
} catch (...) {
// file not found or value not convertible into integer
}
try {
std::string value =