mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'generic-col-types' of https://github.com/arangodb/arangodb into generic-col-types
This commit is contained in:
commit
f2700ed224
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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); }
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue