mirror of https://gitee.com/bigwinds/arangodb
Now AgencyComm only communicates via VPack to Agency. A mix of TRI_json_t and VPack is impossible do to different ordering when comparing values
This commit is contained in:
parent
7f4980e87d
commit
1edd5b3007
|
@ -928,16 +928,9 @@ AgencyCommResult AgencyComm::createDirectory(std::string const& key) {
|
||||||
|
|
||||||
AgencyCommResult AgencyComm::setValue(std::string const& key,
|
AgencyCommResult AgencyComm::setValue(std::string const& key,
|
||||||
TRI_json_t const* json, double ttl) {
|
TRI_json_t const* json, double ttl) {
|
||||||
AgencyCommResult result;
|
// Only temporary
|
||||||
|
auto builder = triagens::basics::JsonHelper::toVelocyPack(json);
|
||||||
sendWithFailover(triagens::rest::HttpRequest::HTTP_REQUEST_PUT,
|
return setValue(key, builder->slice(), ttl);
|
||||||
_globalConnectionOptions._requestTimeout, result,
|
|
||||||
buildUrl(key) + ttlParam(ttl, true),
|
|
||||||
"value=" + triagens::basics::StringUtils::urlEncode(
|
|
||||||
triagens::basics::JsonHelper::toString(json)),
|
|
||||||
false);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue