mirror of https://gitee.com/bigwinds/arangodb
dumb warnings
This commit is contained in:
parent
b865f3a41c
commit
4570320a5b
|
@ -41,7 +41,6 @@ AgencyFeature::AgencyFeature(application_features::ApplicationServer* server)
|
|||
_size(1),
|
||||
_minElectionTimeout(0.5),
|
||||
_maxElectionTimeout(2.5),
|
||||
_notify(false),
|
||||
_supervision(false),
|
||||
_waitForSync(true),
|
||||
_supervisionFrequency(5.0),
|
||||
|
|
|
@ -49,7 +49,6 @@ class AgencyFeature : virtual public application_features::ApplicationFeature {
|
|||
std::string _agentId;
|
||||
double _minElectionTimeout; // min election timeout
|
||||
double _maxElectionTimeout; // max election timeout
|
||||
bool _notify; // interval between retry to slaves
|
||||
bool _supervision;
|
||||
bool _waitForSync;
|
||||
double _supervisionFrequency;
|
||||
|
|
|
@ -149,8 +149,9 @@ bool Agent::leading() const {
|
|||
|
||||
|
||||
void Agent::startConstituent() {
|
||||
|
||||
activateAgency();
|
||||
|
||||
|
||||
auto database = ApplicationServer::getFeature<DatabaseFeature>("Database");
|
||||
auto vocbase = database->vocbase();
|
||||
auto queryRegistry = QueryRegistryFeature::QUERY_REGISTRY;
|
||||
|
|
|
@ -452,6 +452,12 @@ void Constituent::run() {
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> act = _agent->config().active();
|
||||
while(!this->isStopping() &&
|
||||
((find(act.begin(), act.end(), _id) - act.begin()) >= size())) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
}
|
||||
|
||||
if (size() == 1) {
|
||||
_leaderID = _agent->config().id();
|
||||
} else {
|
||||
|
|
|
@ -58,7 +58,7 @@ void Inception::run() {
|
|||
auto s = std::chrono::system_clock::now();
|
||||
std::chrono::seconds timeout(5);
|
||||
size_t i = 0;
|
||||
bool cs = false;
|
||||
//bool cs = false;
|
||||
while (!this->isStopping()) {
|
||||
|
||||
config_t config = _agent->config(); // get a copy of conf
|
||||
|
@ -113,10 +113,11 @@ void Inception::run() {
|
|||
}
|
||||
|
||||
if (config.poolComplete()) {
|
||||
if(!cs) {
|
||||
//if(!cs) {
|
||||
_agent->startConstituent();
|
||||
cs = true;
|
||||
}
|
||||
break;
|
||||
//cs = true;
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ RestHandler::status RestAgencyHandler::handleConfig() {
|
|||
body.add(VPackValue(VPackValueType::Object));
|
||||
body.add("term", Value(_agent->term()));
|
||||
body.add("leaderId", Value(_agent->leaderID()));
|
||||
body.add("lastCommited", Value(_agent->lastCommitted()));
|
||||
body.add("lastCommitted", Value(_agent->lastCommitted()));
|
||||
body.add("configuration", _agent->config().toBuilder()->slice());
|
||||
body.close();
|
||||
generateResult(GeneralResponse::ResponseCode::OK, body.slice());
|
||||
|
|
|
@ -409,7 +409,7 @@ bool State::loadCollections(TRI_vocbase_t* vocbase, QueryRegistry* queryRegistry
|
|||
|
||||
TRI_ASSERT(_vocbase != nullptr);
|
||||
|
||||
_options.waitForSync = false;
|
||||
_options.waitForSync = waitForSync;
|
||||
_options.silent = true;
|
||||
|
||||
if (loadPersisted()) {
|
||||
|
|
|
@ -34,16 +34,17 @@ BASE=5001
|
|||
rm -rf agency
|
||||
mkdir -p agency
|
||||
echo -n "Starting agency ... "
|
||||
for aid in `seq 0 $(( $NRAGENTS - 1 ))`; do
|
||||
for aid in `seq 0 $(( $POOLSZ - 1 ))`; do
|
||||
port=$(( $BASE + $aid ))
|
||||
build/bin/arangod \
|
||||
-c none \
|
||||
--agency.activate true \
|
||||
--agency.endpoint tcp://localhost:$BASE \
|
||||
--agency.size $NRAGENTS \
|
||||
--agency.pool-size $POOLSZ \
|
||||
--agency.supervision true \
|
||||
--agency.supervision-frequency $SFRE \
|
||||
--agency.wait-for-sync true \
|
||||
--agency.wait-for-sync false \
|
||||
--agency.election-timeout-min $MINP \
|
||||
--agency.election-timeout-max $MAXP \
|
||||
--database.directory agency/data$port \
|
||||
|
|
Loading…
Reference in New Issue