1
0
Fork 0

Get rid of unnecessary warning about _lockedShards.

This commit is contained in:
Max Neunhoeffer 2015-01-30 15:04:39 +01:00
parent b31b8d9678
commit a5728d6793
2 changed files with 17 additions and 5 deletions

View File

@ -151,7 +151,8 @@ Query::Query (triagens::arango::ApplicationV8* applicationV8,
_part(part),
_contextOwnedByExterior(contextOwnedByExterior) {
// std::cout << TRI_CurrentThreadId() << ", QUERY " << this << " CTOR: " << queryString << "\r\n";
// std::cout << TRI_CurrentThreadId() << ", QUERY " << this << " CTOR: " << queryString << "\n";
TRI_ASSERT(_vocbase != nullptr);
if (profiling()) {
@ -198,6 +199,8 @@ Query::Query (triagens::arango::ApplicationV8* applicationV8,
_part(part),
_contextOwnedByExterior(contextOwnedByExterior) {
// std::cout << TRI_CurrentThreadId() << ", QUERY " << this << " CTOR (JSON): " << _queryJson.toString() << "\n";
TRI_ASSERT(_vocbase != nullptr);
if (profiling()) {

View File

@ -120,9 +120,10 @@ void QueryRegistry::insert (QueryId id,
if (Transaction::_makeNolockHeaders == query->engine()->lockedShards()) {
Transaction::_makeNolockHeaders = nullptr;
}
else {
LOG_WARNING("Found strange lockedShards in thread!");
}
// else {
// We have not set it, just leave it alone. This happens in particular
// on the DBServers, who do not set lockedShards() themselves.
// }
}
}
else {
@ -207,7 +208,15 @@ void QueryRegistry::close (TRI_vocbase_t* vocbase, QueryId id, double ttl) {
Transaction::_makeNolockHeaders = nullptr;
}
else {
LOG_WARNING("Found strange lockedShards in thread!");
if (Transaction::_makeNolockHeaders != nullptr) {
if (Transaction::_makeNolockHeaders == qi->_query->engine()->lockedShards()) {
Transaction::_makeNolockHeaders = nullptr;
}
// else {
// We have not set it, just leave it alone. This happens in particular
// on the DBServers, who do not set lockedShards() themselves.
// }
}
}
}