You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Sailesh Mukil (Code Review)" <ge...@cloudera.org> on 2016/03/04 07:35:35 UTC

[Impala-CR](cdh5-trunk) PREVIEW: IMPALA-3104: Catch exception on failure to create thread

Sailesh Mukil has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2453

Change subject: PREVIEW: IMPALA-3104: Catch exception on failure to create thread
......................................................................

PREVIEW: IMPALA-3104: Catch exception on failure to create thread

If we reach the number of threads as specified by ulimit, the boost
library throws an exception on trying to create any new threads
since. We previously did not catch these exceptions causing impala
to crash.

This patch creates a new static function AllocateThread() which tries
to create a thread and returns an error if it wasn't able to create
one.

TODO: ThreadPool still does not handle error propagation on failure
to create a thread. This is a little trickier because ThreadPool
is mostly initialized from other constructors where we really can't
propagate errors. Will need to update if reviewers agree on current
design.

Change-Id: I93629bbec08a0ea362794cd739503476e0caa1c5
---
M be/src/catalog/catalog-server.cc
M be/src/exec/hdfs-scan-node.cc
M be/src/rpc/authentication.cc
M be/src/rpc/thrift-server.cc
M be/src/runtime/disk-io-mgr.cc
M be/src/runtime/parallel-executor.cc
M be/src/runtime/plan-fragment-executor.cc
M be/src/scheduling/admission-controller.cc
M be/src/service/fragment-mgr.cc
M be/src/service/impala-server.cc
M be/src/service/query-exec-state.cc
M be/src/statestore/statestore-subscriber.cc
M be/src/testutil/in-process-servers.cc
M be/src/util/thread-pool.h
M be/src/util/thread.cc
M be/src/util/thread.h
16 files changed, 182 insertions(+), 53 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93629bbec08a0ea362794cd739503476e0caa1c5
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>