Riza Suminto has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/23168 )

Change subject: IMPALA-14220: CatalogServer::IsActive must not hold 
catalog_lock_
......................................................................

IMPALA-14220: CatalogServer::IsActive must not hold catalog_lock_

When catalogd HA is enabled, catalogd will check whether it is the
active one, via CatalogServer::IsActive, before serving each request.
Calling CatalogServer::IsActive require obtaining catalog_lock_, which
can contend with long catalog operation such as
GatherCatalogUpdatesThread.

Checking current catalog active status does not need to obtain
catalog_lock_. Instead, it is sufficient to change is_active_ field from
boolean to AtomicBoolean. This patch applies that change.

With this change, CatalogServiceThriftIf::AcceptRequest can return
faster. Other CatalogServiceThriftIf methods that previously blocked on
AcceptRequest method can proceeed faster, but might still contend over
Catalog's versionLock_ in JVM later.

Testing:
Run and pass test_catalogd_ha.py.

Change-Id: I15fb925f1eb4ea5d213075b66a676d2bc9b9e9f1
Reviewed-on: http://gerrit.cloudera.org:8080/23168
Reviewed-by: Abhishek Rawat <ara...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
M be/src/catalog/catalog-server.cc
M be/src/catalog/catalog-server.h
M be/src/catalog/workload-management-init.cc
3 files changed, 11 insertions(+), 12 deletions(-)

Approvals:
  Abhishek Rawat: Looks good to me, but someone else must approve
  Wenzhe Zhou: Looks good to me, approved
  Impala Public Jenkins: Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I15fb925f1eb4ea5d213075b66a676d2bc9b9e9f1
Gerrit-Change-Number: 23168
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>

Reply via email to