mirror of https://gitee.com/bigwinds/arangodb
fixed segfaults when running cluster AQL queries in console thread
This commit is contained in:
parent
c677ea8b88
commit
4cc1e854c1
|
@ -6803,7 +6803,12 @@ ClusterCommResult* RemoteBlock::sendRequest (
|
||||||
headers.emplace(make_pair("Shard-Id", _ownName));
|
headers.emplace(make_pair("Shard-Id", _ownName));
|
||||||
}
|
}
|
||||||
|
|
||||||
triagens::rest::DispatcherThread::currentDispatcherThread->blockThread();
|
auto currentThread = triagens::rest::DispatcherThread::currentDispatcherThread;
|
||||||
|
|
||||||
|
if (currentThread != nullptr) {
|
||||||
|
triagens::rest::DispatcherThread::currentDispatcherThread->blockThread();
|
||||||
|
}
|
||||||
|
|
||||||
auto result = cc->syncRequest(clientTransactionId,
|
auto result = cc->syncRequest(clientTransactionId,
|
||||||
coordTransactionId,
|
coordTransactionId,
|
||||||
_server,
|
_server,
|
||||||
|
@ -6814,7 +6819,10 @@ ClusterCommResult* RemoteBlock::sendRequest (
|
||||||
body,
|
body,
|
||||||
headers,
|
headers,
|
||||||
defaultTimeOut);
|
defaultTimeOut);
|
||||||
triagens::rest::DispatcherThread::currentDispatcherThread->unblockThread();
|
|
||||||
|
if (currentThread != nullptr) {
|
||||||
|
triagens::rest::DispatcherThread::currentDispatcherThread->unblockThread();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
LEAVE_BLOCK
|
LEAVE_BLOCK
|
||||||
|
|
Loading…
Reference in New Issue