impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Vissapragada (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4449: Revisit table locking pattern in the catalog
Date Tue, 17 Jan 2017 19:54:11 GMT
Bharath Vissapragada has posted comments on this change.

Change subject: IMPALA-4449: Revisit table locking pattern in the catalog

Patch Set 1:

Commit Message:

PS1, Line 29: getAllCatalogObjects
File fe/src/main/java/org/apache/impala/catalog/

Line 926:     while (true) {
Regarding supportability, should we log a debug message/expose a average wait time metric
via JMX if its stuck in these loops for longer than a configured value? IMO that makes it
easier to debug queries hung at Catalog operations. (Same comment for other methods that follow
this pattern, just wanted to hear you thoughts)

Line 928:       if (tbl.getLock().writeLock().tryLock()) {
To avoid extra branch, may be we could refactor to something like

if (!tbl.getLock().writeLock().tryLock()) {
(Same comment for other places that uses this pattern)

PS1, Line 950: continue;

Line 1305:           hdfsTable.setCatalogVersion(newCatalogVersion);
- Just curious, is this an existing bug that we didn't set it if the partition exists?

- May be we can move this line after L1285 before the try block since we are setting for both
cases anyway and remove it at L1296?

Line 1312:         continue;
File fe/src/main/java/org/apache/impala/service/

Line 190:  * }
I think we should document the exception of getCatalogObjects() here.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Id08e21da31deb1f003b3cada4517651f3b3b2bb2
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-HasComments: Yes

View raw message