Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/20192 )

Change subject: IMPALA-12267: DMLs/DDLs can hang as a result of catalogd restart
......................................................................

IMPALA-12267: DMLs/DDLs can hang as a result of catalogd restart

IMPALA-5476 added handling for changes in catalogd service ID during the
lifetime of a DML/DDL query, but the loop that waits for a new catalogd
service ID can wait indefinitely in case the DML/DDL was handled by the
previous catalogd and restart happened just after replying to the
coordinator:
https://github.com/apache/impala/blob/d0fe4c604f72d41019832513ebf65cfe8f469953/be/src/service/impala-server.cc#L2204

This change adds two new startup flags. The first one is
'--wait_for_new_catalog_service_id_timeout_sec', which sets an upper
limit on the waiting time (in seconds). The second one is
'--wait_for_new_catalog_service_id_max_iterations', which limits how
many valid catalog updates without a new catalog service ID the
coordinator receives before it gives up and stops waiting.

For both startup flags, negative values and zero turn the feature off.

If the coordinator gives up waiting because of either of the new startup
flags, the local catalog cache is not updated and a warning is logged.

Testing:
 - added a custom cluster test that reproduces the above condition using
   a debug action and verifies that the waiting loop times out.

Change-Id: Ib71bec8f67f80b0bdfe0a6cc46a16ef624163d8b
Reviewed-on: http://gerrit.cloudera.org:8080/20192
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/service/client-request-state.cc
M be/src/service/impala-server.cc
M be/src/service/impala-server.h
M fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java
M tests/custom_cluster/test_restart_services.py
5 files changed, 256 insertions(+), 33 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib71bec8f67f80b0bdfe0a6cc46a16ef624163d8b
Gerrit-Change-Number: 20192
Gerrit-PatchSet: 10
Gerrit-Owner: Daniel Becker <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>

Reply via email to