From 8441da1be133b2aa9c22bf50a04cf3b8781aa53a Mon Sep 17 00:00:00 2001 From: Kaveh Vahedipour Date: Thu, 19 Jan 2017 13:21:15 +0100 Subject: [PATCH] inquire in agency interface adjusted --- arangod/Agency/AgencyComm.cpp | 3 ++- arangod/Agency/Agent.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arangod/Agency/AgencyComm.cpp b/arangod/Agency/AgencyComm.cpp index f852cf9b11..6e16adc47d 100644 --- a/arangod/Agency/AgencyComm.cpp +++ b/arangod/Agency/AgencyComm.cpp @@ -1074,7 +1074,8 @@ AgencyCommResult AgencyComm::sendTransactionWithFailover( : timeout), url, builder.slice().toJson()); - if (!result.successful() && result.httpCode() != 412) { + if (!result.successful() && result.httpCode() != + (int)arangodb::rest::ResponseCode::PRECONDITION_FAILED) { return result; } diff --git a/arangod/Agency/Agent.cpp b/arangod/Agency/Agent.cpp index b0b82ca400..42c15f1714 100644 --- a/arangod/Agency/Agent.cpp +++ b/arangod/Agency/Agent.cpp @@ -653,7 +653,7 @@ trans_ret_t Agent::transact(query_t const& queries) { // Non-persistent write to non-persisted key-value store -trans_ret_t Agent::transient(query_t const& query) { +trans_ret_t Agent::transient(query_t const& queries) { auto ret = std::make_shared(); auto leader = _constituent.leaderID(); @@ -674,7 +674,7 @@ trans_ret_t Agent::transient(query_t const& query) { } // Read and writes - for (const auto& query : VPackArrayIterator(query->slice())) { + for (const auto& query : VPackArrayIterator(queries->slice())) { if (query[0].isObject()) { _transient.apply(query); } else if (query[0].isString()) {