1
0
Fork 0

visualstudio fixes

This commit is contained in:
Kaveh Vahedipour 2016-04-11 15:53:06 +02:00
parent f232a8db86
commit 342a4f8113
3 changed files with 9 additions and 6 deletions

View File

@ -102,11 +102,12 @@ struct AgentConfiguration {
std::vector<std::string> end_points;
std::string end_point_persist;
bool notify;
bool sanity_check;
AgentConfiguration () : id(0), min_ping(.15), max_ping(.3f), notify(false) {};
AgentConfiguration (uint32_t i, double min_p, double max_p, std::string ep,
std::vector<std::string> const& eps, bool n = false) :
std::vector<std::string> const& eps, bool n = false, bool s = false) :
id(i), min_ping(min_p), max_ping(max_p), end_point(ep), end_points(eps),
notify(n) {
notify(n), sanity_check(s) {
end_point_persist = end_points[id];
}
inline size_t size() const {return end_points.size();}

View File

@ -69,7 +69,7 @@ void ApplicationAgency::setupOptions(
("agency.election_call_rate_mul [au]", &_election_call_rate_mul,
"Multiplier (<1.0) defining how long the election timeout is with respect "
"to the minumum election timeout")
("agency.notify", &_notify, "Notify others");
("agency.notify", &_notify, "Notify others")
("agency.sanity-check", &_sanity_check,
"Perform arangodb cluster sanity checking");
@ -148,7 +148,8 @@ bool ApplicationAgency::prepare() {
new agent_t(
_server, arangodb::consensus::config_t(
_agent_id, _min_election_timeout, _max_election_timeout,
endpoint, _agency_endpoints, _notify), _applicationV8, _queryRegistry));
endpoint, _agency_endpoints, _notify, _sanity_check), _applicationV8,
_queryRegistry));
return true;

View File

@ -26,6 +26,7 @@
#include "Basics/ConditionLocker.h"
#include "Aql/Query.h"
#include "Aql/QueryRegistry.h"
#include "Utils/OperationOptions.h"
#include "Utils/OperationResult.h"
#include "Utils/SingleCollectionTransaction.h"
@ -116,7 +117,7 @@ void Constituent::term(term_t t) {
options.waitForSync = true;
options.silent = true;
OperationResult result = trx.insert("log", body.slice(), options);
OperationResult result = trx.insert("election", body.slice(), options);
res = trx.finish(result.code);
}
@ -374,7 +375,7 @@ void Constituent::run() {
}
VPackSlice result = queryResult.result->slice();
std::cout << result.toJson() << std::endl;
// Always start off as follower