Internal Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3385: Fix crashes on accessing error_log
......................................................................


IMPALA-3385: Fix crashes on accessing error_log

We used to check error_log empty with error_log.empty(), but
this may return false even when some of its member has empty
messages, thus crashes impala.

This commit:

1. Remove error_log from HdfsScanNode::ProcessSplit() since the
logs may contain irrelevant errors. This also prevents a
potential race condition when error_log is checked and enters
if clause, but later is changed by other threads. Also prevent
crashes when error_log has a cleared entry.

2. Hold locks and return a copy of the
RuntimeState::error_log_, fixing a race in the coordinator.

Change-Id: I3a7e3d22e26147ada780aae5aed1f2e25a515afc
Reviewed-on: http://gerrit.cloudera.org:8080/2829
Reviewed-by: Dan Hecht <[email protected]>
Reviewed-by: Huaisi Xu <[email protected]>
Tested-by: Internal Jenkins
---
M be/src/exec/exec-node.cc
M be/src/exec/hdfs-scan-node.cc
M be/src/runtime/coordinator.cc
M be/src/runtime/runtime-state.cc
M be/src/runtime/runtime-state.h
M be/src/util/error-util-test.cc
M be/src/util/error-util.cc
M be/src/util/error-util.h
M common/thrift/ImpalaInternalService.thrift
M common/thrift/PlanNodes.thrift
A tests/query_test/test_errorlog.py
11 files changed, 155 insertions(+), 46 deletions(-)

Approvals:
  Huaisi Xu: Looks good to me, approved
  Internal Jenkins: Verified
  Dan Hecht: Looks good to me, approved



-- 
To view, visit http://gerrit.cloudera.org:8080/2829
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a7e3d22e26147ada780aae5aed1f2e25a515afc
Gerrit-PatchSet: 14
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Huaisi Xu <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Huaisi Xu <[email protected]>
Gerrit-Reviewer: Internal Jenkins

Reply via email to