Yida Wu has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22422


Change subject: IMPALA-13703: Cancel running queries after shutdown deadline
......................................................................

IMPALA-13703: Cancel running queries after shutdown deadline

Currently, when the graceful shutdown deadline is reached, Impala
exits immediately, leaving any running queries unfinished. This
approach is not quite graceful, as it may result in unreleased
resources, such as scratch files in remote storage.

This patch adds a new state in the graceful shutdown process.
After reaching the shutdown deadline, Impala will try to cancel
any remaining running queries within a configurable timelimit
flag, shutdown_query_cancel_period_s. If all queries are
successfully canceled within this period, the server shuts down
immediately. Otherwise, it continues to shutdown once the period
expires after the deadline, leaving any still running queries.

Tests:
Passed core tests.
Manually tested shutdown a coord or an executor with running queries
and they were canceled.

TODO: Add testcases and update code comments about this graceful
shutdown process change.

Change-Id: I1cac2e100d329644e21fdceb0b23901b08079130
---
M be/src/runtime/query-exec-mgr.cc
M be/src/runtime/query-exec-mgr.h
M be/src/service/cancellation-work.h
M be/src/service/impala-server.cc
M be/src/service/impala-server.h
M tests/custom_cluster/test_restart_services.py
6 files changed, 131 insertions(+), 24 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cac2e100d329644e21fdceb0b23901b08079130
Gerrit-Change-Number: 22422
Gerrit-PatchSet: 1
Gerrit-Owner: Yida Wu <[email protected]>

Reply via email to