mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
865c284c59
|
@ -50,7 +50,8 @@ void Inception::gossip() {
|
||||||
|
|
||||||
auto s = std::chrono::system_clock::now();
|
auto s = std::chrono::system_clock::now();
|
||||||
std::chrono::seconds timeout(120);
|
std::chrono::seconds timeout(120);
|
||||||
size_t i = 0;
|
size_t j = 0;
|
||||||
|
bool complete = false;
|
||||||
|
|
||||||
CONDITION_LOCKER(guard, _cv);
|
CONDITION_LOCKER(guard, _cv);
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ void Inception::gossip() {
|
||||||
// gossip peers
|
// gossip peers
|
||||||
for (auto const& p : config.gossipPeers()) {
|
for (auto const& p : config.gossipPeers()) {
|
||||||
if (p != config.endpoint()) {
|
if (p != config.endpoint()) {
|
||||||
std::string clientid = config.id() + std::to_string(i++);
|
std::string clientid = config.id() + std::to_string(j++);
|
||||||
auto hf =
|
auto hf =
|
||||||
std::make_unique<std::unordered_map<std::string, std::string>>();
|
std::make_unique<std::unordered_map<std::string, std::string>>();
|
||||||
arangodb::ClusterComm::instance()->asyncRequest(
|
arangodb::ClusterComm::instance()->asyncRequest(
|
||||||
|
@ -88,7 +89,7 @@ void Inception::gossip() {
|
||||||
// pool entries
|
// pool entries
|
||||||
for (auto const& pair : config.pool()) {
|
for (auto const& pair : config.pool()) {
|
||||||
if (pair.second != config.endpoint()) {
|
if (pair.second != config.endpoint()) {
|
||||||
std::string clientid = config.id() + std::to_string(i++);
|
std::string clientid = config.id() + std::to_string(j++);
|
||||||
auto hf =
|
auto hf =
|
||||||
std::make_unique<std::unordered_map<std::string, std::string>>();
|
std::make_unique<std::unordered_map<std::string, std::string>>();
|
||||||
arangodb::ClusterComm::instance()->asyncRequest(
|
arangodb::ClusterComm::instance()->asyncRequest(
|
||||||
|
@ -99,7 +100,7 @@ void Inception::gossip() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't panic
|
// don't panic
|
||||||
_cv.wait(100000);
|
_cv.wait(500000);
|
||||||
|
|
||||||
// Timed out? :(
|
// Timed out? :(
|
||||||
if ((std::chrono::system_clock::now() - s) > timeout) {
|
if ((std::chrono::system_clock::now() - s) > timeout) {
|
||||||
|
@ -114,9 +115,12 @@ void Inception::gossip() {
|
||||||
|
|
||||||
// We're done
|
// We're done
|
||||||
if (config.poolComplete()) {
|
if (config.poolComplete()) {
|
||||||
|
if (complete) {
|
||||||
_agent->startConstituent();
|
_agent->startConstituent();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
complete = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,10 @@ void AgencyCommResult::clear() {
|
||||||
/// get results of query as slice
|
/// get results of query as slice
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
VPackSlice AgencyCommResult::slice() { return _vpack->slice(); }
|
VPackSlice AgencyCommResult::slice() {
|
||||||
|
TRI_ASSERT(_vpack != nullptr);
|
||||||
|
return _vpack->slice();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief the static global URL prefix
|
/// @brief the static global URL prefix
|
||||||
|
|
Loading…
Reference in New Issue