1
0
Fork 0

Merge branch 'generic-col-types' of https://github.com/arangodb/arangodb into generic-col-types

This commit is contained in:
jsteemann 2016-09-07 14:33:00 +02:00
commit f2700ed224
6 changed files with 15 additions and 10 deletions

View File

@ -279,10 +279,11 @@ void Agent::sendAppendEntriesRPC() {
std::vector<log_t> unconfirmed = _state.get(last_confirmed);
index_t highest = unconfirmed.back().index;
if (highest == _lastHighest[followerId] &&
(long)(500.0e6 * _config.minPing()) >
(std::chrono::system_clock::now() - _lastSent[followerId])
.count()) {
std::chrono::duration<double> m =
std::chrono::system_clock::now() - _lastSent[followerId];
if (highest == _lastHighest[followerId]
&& 0.5 * _config.minPing() > m.count()) {
continue;
}

View File

@ -170,7 +170,7 @@ class Agent : public arangodb::Thread {
/// @brief Activate this agent in single agent mode.
bool activateAgency();
/// @brief Activate new agent in pool to replace failed agent
/// @brief Activate new agent in pool to replace failed
bool activateStandbyAgent();
/// @brief Assignment of persisted state

View File

@ -661,11 +661,14 @@ bool Node::applies(VPackSlice const& slice) {
return true;
}
void Node::toBuilder(Builder& builder) const {
void Node::toBuilder(Builder& builder, bool showHidden) const {
try {
if (type() == NODE) {
VPackObjectBuilder guard(&builder);
for (auto const& child : _children) {
if (child.first[0] == '.' && !showHidden) {
continue;
}
builder.add(VPackValue(child.first));
child.second->toBuilder(builder);
}

View File

@ -164,7 +164,7 @@ class Node {
bool handle(arangodb::velocypack::Slice const&);
/// @brief Create Builder representing this store
void toBuilder(Builder&) const;
void toBuilder(Builder&, bool showHidden = false) const;
/// @brief Access children
Children& children();

View File

@ -466,7 +466,7 @@ query_t Store::clearExpired() const {
/// Dump internal data to builder
void Store::dumpToBuilder(Builder& builder) const {
MUTEX_LOCKER(storeLocker, _storeLock);
toBuilder(builder);
toBuilder(builder, true);
{
VPackObjectBuilder guard(&builder);
for (auto const& i : _timeTable) {
@ -591,7 +591,8 @@ Store& Store::operator=(VPackSlice const& slice) {
}
/// Put key value store in velocypack
void Store::toBuilder(Builder& b) const { _node.toBuilder(b); }
void Store::toBuilder(Builder& b, bool showHidden) const {
_node.toBuilder(b, showHidden); }
/// Get kv-store at path vector
Node Store::operator()(std::vector<std::string> const& pv) { return _node(pv); }

View File

@ -100,7 +100,7 @@ class Store : public arangodb::Thread {
bool applies(arangodb::velocypack::Slice const&);
/// @brief Create Builder representing this store
void toBuilder(Builder&) const;
void toBuilder(Builder&, bool showHidden = false) const;
/// @brief Copy out a node
Node const get(std::string const& path) const;