Hello Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#3).

Change subject: WIP: Implement in-place reset metadata for CatalogD
......................................................................

WIP: Implement in-place reset metadata for CatalogD

This patch improve the availability of CatalogD under huge INVALIDATE
METADATA operation. Previously, CatalogServiceCatalog.reset() hold
versionLock_.writeLock() for the whole reset duration. When the number of
database, tables, or functions are big, this write lock can be held for
a long time, preventing any other catalog operation from proceeding.

This patch improve the situation by making CatalogServiceCatalog.reset()
do invalidations in stages and release the write lock temporarily in
between stages. In order to do so, Db adds, updates, and removal should
happen directly into dbCache_. To do so, this patch enforce
lexicographic order during reset() and ensure all Db invalidation within
that stage is complete before releasing the write lock. Stages should
run in approximately the same amount of time.

A catalog operation over a database must ensure that no reset operation
is currently running, or the database name is lexicographically less
than the database name that is currently under invalidation. This patch
adds waitOngoingResetMetadata() method to help facilitate that waiting.
Caller must hold the versionLock_.writeLock() before calling
waitOngoingResetMetadata().

CatalogServiceCatalog.getAllDbs() get a snapshot of dbCache_ values at a
time. With this patch, it is now possible that some Db in this snapshot
maybe removed from dbCache() by concurrent reset(). Caller that cares
about snapshot integrity like CatalogServiceCatalog.getCatalogDelta()
should be careful when iterating the snapshot. It must iterate in
lexicographic order, similar like reset(), and make sure that it does
not go beyond the current database-under-invalidation. It also must skip
the Db that it is currently being inspected if Db.isRemoved() is True.

Testing:
- Pass exhaustive tests.

Change-Id: Ib4ae2154612746b34484391c5950e74b61f85c9d
---
M be/src/catalog/catalog-server.cc
M be/src/util/backend-gflag-util.cc
M common/thrift/BackendGflags.thrift
M fe/src/main/java/org/apache/impala/catalog/Catalog.java
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/Db.java
M fe/src/main/java/org/apache/impala/service/BackendConfig.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M fe/src/main/java/org/apache/impala/util/DebugUtils.java
M tests/custom_cluster/test_catalogd_ha.py
M tests/custom_cluster/test_concurrent_ddls.py
11 files changed, 315 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/22640/3
--
To view, visit http://gerrit.cloudera.org:8080/22640
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib4ae2154612746b34484391c5950e74b61f85c9d
Gerrit-Change-Number: 22640
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>

Reply via email to