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 Fri, 20 Jan 2017 00:32:40 GMT
Bharath Vissapragada has posted comments on this change.

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

Patch Set 3:

File fe/src/main/java/org/apache/impala/catalog/

Line 196:       catalogLock_.writeLock().lock();
- The only pattern I see for taking this write lock seems to be to be to call incrementAndGetCatalogVersion()
and then we immediately unlock() it.(Please correct me if I'm wrong).

- If it is the only case, can we call incrementAndGetCatalogVersion() below and make this
method return the new version? Something like tryLockTableAndGetNewVersion()? That prevents
the callers from accidentally missing a catalogLock_.writeLock().unlock()?

- That also addresses Marcel's comment about adding a Precondition check for each block.

- Not totally sure if this is a good idea but wanted to put it up for discussion.
File fe/src/main/java/org/apache/impala/service/

Line 384:       catalog_.getLock().writeLock().unlock();
We don't seem to be write-locking this after L378. Is this really required?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Id08e21da31deb1f003b3cada4517651f3b3b2bb2
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-HasComments: Yes

View raw message