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);
|
std::vector<log_t> unconfirmed = _state.get(last_confirmed);
|
||||||
index_t highest = unconfirmed.back().index;
|
index_t highest = unconfirmed.back().index;
|
||||||
|
|
||||||
if (highest == _lastHighest[followerId] &&
|
std::chrono::duration<double> m =
|
||||||
(long)(500.0e6 * _config.minPing()) >
|
std::chrono::system_clock::now() - _lastSent[followerId];
|
||||||
(std::chrono::system_clock::now() - _lastSent[followerId])
|
|
||||||
.count()) {
|
if (highest == _lastHighest[followerId]
|
||||||
|
&& 0.5 * _config.minPing() > m.count()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ class Agent : public arangodb::Thread {
|
||||||
/// @brief Activate this agent in single agent mode.
|
/// @brief Activate this agent in single agent mode.
|
||||||
bool activateAgency();
|
bool activateAgency();
|
||||||
|
|
||||||
/// @brief Activate new agent in pool to replace failed agent
|
/// @brief Activate new agent in pool to replace failed
|
||||||
bool activateStandbyAgent();
|
bool activateStandbyAgent();
|
||||||
|
|
||||||
/// @brief Assignment of persisted state
|
/// @brief Assignment of persisted state
|
||||||
|
|
|
@ -661,11 +661,14 @@ bool Node::applies(VPackSlice const& slice) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::toBuilder(Builder& builder) const {
|
void Node::toBuilder(Builder& builder, bool showHidden) const {
|
||||||
try {
|
try {
|
||||||
if (type() == NODE) {
|
if (type() == NODE) {
|
||||||
VPackObjectBuilder guard(&builder);
|
VPackObjectBuilder guard(&builder);
|
||||||
for (auto const& child : _children) {
|
for (auto const& child : _children) {
|
||||||
|
if (child.first[0] == '.' && !showHidden) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
builder.add(VPackValue(child.first));
|
builder.add(VPackValue(child.first));
|
||||||
child.second->toBuilder(builder);
|
child.second->toBuilder(builder);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ class Node {
|
||||||
bool handle(arangodb::velocypack::Slice const&);
|
bool handle(arangodb::velocypack::Slice const&);
|
||||||
|
|
||||||
/// @brief Create Builder representing this store
|
/// @brief Create Builder representing this store
|
||||||
void toBuilder(Builder&) const;
|
void toBuilder(Builder&, bool showHidden = false) const;
|
||||||
|
|
||||||
/// @brief Access children
|
/// @brief Access children
|
||||||
Children& children();
|
Children& children();
|
||||||
|
|
|
@ -466,7 +466,7 @@ query_t Store::clearExpired() const {
|
||||||
/// Dump internal data to builder
|
/// Dump internal data to builder
|
||||||
void Store::dumpToBuilder(Builder& builder) const {
|
void Store::dumpToBuilder(Builder& builder) const {
|
||||||
MUTEX_LOCKER(storeLocker, _storeLock);
|
MUTEX_LOCKER(storeLocker, _storeLock);
|
||||||
toBuilder(builder);
|
toBuilder(builder, true);
|
||||||
{
|
{
|
||||||
VPackObjectBuilder guard(&builder);
|
VPackObjectBuilder guard(&builder);
|
||||||
for (auto const& i : _timeTable) {
|
for (auto const& i : _timeTable) {
|
||||||
|
@ -591,7 +591,8 @@ Store& Store::operator=(VPackSlice const& slice) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Put key value store in velocypack
|
/// 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
|
/// Get kv-store at path vector
|
||||||
Node Store::operator()(std::vector<std::string> const& pv) { return _node(pv); }
|
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&);
|
bool applies(arangodb::velocypack::Slice const&);
|
||||||
|
|
||||||
/// @brief Create Builder representing this store
|
/// @brief Create Builder representing this store
|
||||||
void toBuilder(Builder&) const;
|
void toBuilder(Builder&, bool showHidden = false) const;
|
||||||
|
|
||||||
/// @brief Copy out a node
|
/// @brief Copy out a node
|
||||||
Node const get(std::string const& path) const;
|
Node const get(std::string const& path) const;
|
||||||
|
|
Loading…
Reference in New Issue