Dan Hecht has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/10601


Change subject: IMPALA-7101: Fix race between Fetch and Close RPCs that can 
lead to hang
......................................................................

IMPALA-7101: Fix race between Fetch and Close RPCs that can lead to hang

If we hit EOS, we'll wait for all the backends to report status (to try
to get a complete profile). But if the query is closed after this point,
then we can get stuck waiting since once the query is closed,
ImpalaServer won't know about this coordinator and so it will stop
forwarding on the ReportStatus RPCs.

The cancellation test only finds this race once in a while (several
hours) indirectly in a COMPUTE STATS query because the
ChildQueryExecutor will do a CloseOperation() while the execution thread
is inside Fetch(). To make this more reproducible, modify the
cancellation test to allow the close and fetch rpcs to execute
concurrently (don't join the test's fetch thread until after
close). This makes the race reproducible in a few iterations and a few
minutes.

Testing:
- Loop test_cancellation.py

Change-Id: I7c147550f86d81b818ecbdd34cf2919ced7ff8c5
---
M be/src/runtime/coordinator.cc
M tests/query_test/test_cancellation.py
2 files changed, 37 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/01/10601/1
--
To view, visit http://gerrit.cloudera.org:8080/10601
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c147550f86d81b818ecbdd34cf2919ced7ff8c5
Gerrit-Change-Number: 10601
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Hecht <dhe...@cloudera.com>

Reply via email to