Vihang Karajgaonkar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16549


Change subject: IMPALA-6671: [WIP] Skip locked tables from topic updates
......................................................................

IMPALA-6671: [WIP] Skip locked tables from topic updates

This change adds a mechanism for topic-update thread
to skip a table which is locked for more than a
configurable interval from the topic updates. This is
especially useful in scenarios where long running operations on a
locked table (refresh, recover partitions, compute stats) block the
topic update thread. This causes unrelated queries which are
waiting on metadata via topic updates (catalog-v1 mode)
to unnecessarily block.

The ideal solution of this problem would be to make HdfsTable
immutable so that there is no need for table lock. But that
is large change and not easily portable to older releases
of Impala. It would be taken up as a separate patch.

This solution unblocks topic-updates for a while until a
configurable number of topic updates. Once this threshold of
max topic updates is reached, it reverts to the current behavior
of blocking the topic update thread.

Testing:
1. Added a test case which introduces a simulated delay
in a refresh table command. This causes the table to be locked
for a long time. The topic update thread skips that table from
updates and unrelated queries are unblocked since they receive
the required metadata from updates.

Change-Id: Ic657b96edbcdc94c6b906e7ca59291f4e4715655
---
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/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
M fe/src/main/java/org/apache/impala/catalog/Table.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_topic_update_frequency.py
8 files changed, 272 insertions(+), 45 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic657b96edbcdc94c6b906e7ca59291f4e4715655
Gerrit-Change-Number: 16549
Gerrit-PatchSet: 1
Gerrit-Owner: Vihang Karajgaonkar <[email protected]>

Reply via email to