Yida Wu has uploaded a new patch set (#5). ( 
http://gerrit.cloudera.org:8080/22422 )

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

IMPALA-13703: Cancel running queries before 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.
Before reaching the shutdown deadline, Impala will try to cancel
any remaining running queries within a configurable timelimit
flag, shutdown_query_cancel_period_s. If this time limit exceeds
20% of the total shutdown deadline, it will be automatically
capped at that value. If all queries are successfully canceled
within this period, the server shuts down immediately. Otherwise,
it continues to shutdown once the deadline is reached, leaving
any still running queries.

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

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 common/protobuf/control_service.proto
M tests/custom_cluster/test_restart_services.py
7 files changed, 281 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/22422/5
--
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: newpatchset
Gerrit-Change-Id: I1cac2e100d329644e21fdceb0b23901b08079130
Gerrit-Change-Number: 22422
Gerrit-PatchSet: 5
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Yida Wu <[email protected]>

Reply via email to