Riza Suminto has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22634


Change subject: IMPALA-13850: Wait until CatalogD active before resetting 
metadata
......................................................................

IMPALA-13850: Wait until CatalogD active before resetting metadata

In HA mode, CatalogD initialization can fail to complete within
reasonable time. Log messages showed that CatalogD is blocked trying to
acquire "CatalogServer.catalog_lock_" when calling
CatalogServer::UpdateActiveCatalogd() during statestore subscriber
registration.

This patch skip catalog reset in JniCatalog constructor if HA mode is
enabled. In turn, catalogd-server.cc is now responsible to trigger the
metadata reset (Invaidate Metadata) only if it is the active CatalogD.

After this patch, catalog-server.active-status and /healthz page can
turn into true and OK respectively even if the very first metadata reset
is still ongoing. Observer that cares about having fully populated
metadata should check other metrics such as catalog.num-db,
catalog.num-tables, or /catalog page content.

Testing:
- Run and pass test_catalogd_ha.py

Change-Id: I58cc66dcccedb306ff11893f2916ee5ee6a3efc1
---
M be/src/catalog/catalog-server.cc
M be/src/catalog/catalog-server.h
M fe/src/main/java/org/apache/impala/service/JniCatalog.java
M tests/custom_cluster/test_catalogd_ha.py
4 files changed, 133 insertions(+), 138 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I58cc66dcccedb306ff11893f2916ee5ee6a3efc1
Gerrit-Change-Number: 22634
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>

Reply via email to