1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Frank Celler 2014-12-24 08:27:07 +01:00
commit d419430f2c
4 changed files with 29 additions and 11 deletions

View File

@ -166,6 +166,14 @@ v2.4.0 (XXXX-XX-XX)
* HTTP GET `/_api/replication/logger-config`
* HTTP PUT `/_api/replication/logger-config`
* fixed issue #1174, which was due to locking problems in distributed
AQL execution
* improved cluster locking for AQL avoiding deadlocks
* use DistributeNode for modifying queries with REPLACE and UPDATE, if
possible
v2.3.3 (2014-12-17)
-------------------

View File

@ -4987,17 +4987,29 @@ size_t DistributeBlock::sendToClient (AqlValue val) {
"DistributeBlock: can only send JSON or SHAPED");
}
bool mustFreeJson = false;
TRI_json_t* obj = nullptr;
if (TRI_IsStringJson(json)) {
obj = TRI_CreateObject2Json(TRI_UNKNOWN_MEM_ZONE, 1);
TRI_InsertObjectJson(TRI_UNKNOWN_MEM_ZONE, obj, "_key", json);
mustFreeJson = true;
}
std::string shardId;
bool usesDefaultShardingAttributes;
auto clusterInfo = triagens::arango::ClusterInfo::instance();
auto const planId = triagens::basics::StringUtils::itoa(_collection->getPlanId());
int res = clusterInfo->getResponsibleShard(planId,
json,
mustFreeJson ? obj : json,
true,
shardId,
usesDefaultShardingAttributes);
if (mustFreeJson) {
TRI_FreeJson(TRI_UNKNOWN_MEM_ZONE, obj);
}
if (res != TRI_ERROR_NO_ERROR) {
THROW_ARANGO_EXCEPTION(res);
}

View File

@ -419,7 +419,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[5];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[6];
assertEqual("RemoteNode", node.type);
@ -461,7 +461,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[5];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[6];
assertEqual("RemoteNode", node.type);
@ -500,7 +500,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[4];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[5];
assertEqual("RemoteNode", node.type);
@ -540,7 +540,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[4];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[5];
assertEqual("RemoteNode", node.type);
@ -582,7 +582,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[5];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[6];
assertEqual("RemoteNode", node.type);
@ -625,7 +625,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[5];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[6];
assertEqual("RemoteNode", node.type);
@ -664,7 +664,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[4];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[5];
assertEqual("RemoteNode", node.type);
@ -703,7 +703,7 @@ function ExplainSuite () {
assertEqual("GatherNode", node.type);
node = nodes[4];
assertEqual("ScatterNode", node.type);
assertEqual("DistributeNode", node.type);
node = nodes[5];
assertEqual("RemoteNode", node.type);

View File

@ -131,8 +131,6 @@ LDFLAGS="$SAVE_LDFLAGS"
CPPFLAGS="$SAVE_CPPFLAGS"
LIBS="$SAVE_LIBS"
OPENSSL_CPPFLAGS="${OPENSSL_CPPFLAGS} -DTRI_OPENSSL_VERSION='${TRI_OPENSSL_VERSION}'"
dnl -----------------------------------------------------------------------------------------
dnl informational output
dnl -----------------------------------------------------------------------------------------