diff --git a/arangod/Agency/Agent.cpp b/arangod/Agency/Agent.cpp index 708d96c32a..2b9ceb3a94 100644 --- a/arangod/Agency/Agent.cpp +++ b/arangod/Agency/Agent.cpp @@ -48,6 +48,7 @@ Agent::Agent(config_t const& config) _lastCommitIndex(0), _spearhead(this), _readDB(this), + _vacillant(this), _nextCompationAfter(_config.compactionStepSize()), _inception(std::make_unique(this)), _activator(nullptr), @@ -648,7 +649,7 @@ trans_ret_t Agent::transact(query_t const& queries) { // Non-persistent write to non-persisted key-value store -write_ret_t Agent::write(query_t const& query) { +write_ret_t Agent::vacillant(query_t const& query) { } diff --git a/arangod/Agency/RestAgencyHandler.cpp b/arangod/Agency/RestAgencyHandler.cpp index 02947c4a68..10033c820f 100644 --- a/arangod/Agency/RestAgencyHandler.cpp +++ b/arangod/Agency/RestAgencyHandler.cpp @@ -86,13 +86,15 @@ void RestAgencyHandler::redirectRequest(std::string const& leaderId) { } } -RestStatus RestAgencyHandler::handleVaccilant() { +RestStatus RestAgencyHandler::handleVacillant() { // Must be a POST request if (_request->requestType() != rest::RequestType::POST) { generateError(rest::ResponseCode::METHOD_NOT_ALLOWED, 405); } + query_t query; + // Need Array input if (!query->slice().isArray()) { Builder body; @@ -134,12 +136,15 @@ RestStatus RestAgencyHandler::handleVaccilant() { try { ret = _agent->vacillant(query); } catch (std::exception const& e) { + Builder body; body.openObject(); body.add("message", VPackValue(e.what())); body.close(); generateResult(rest::ResponseCode::BAD, body.slice()); return RestStatus::DONE; } + + return RestStatus::DONE; }