Dimitris Tsirogiannis has posted comments on this change.

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


Patch Set 3:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/5710/3/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
File fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java:

Line 184:   // TODO: Make this parameter configurable
> why? we want to restructure the entire object and locking hierarchy anyway.
Removed.


Line 185:   private static final long TBL_LOCK_TIMEOUT_MS = 3600000;
> this is still an hour. i don't think that's a reasonable timeout value.
Given that certain table operations (e.g. refresh) can take a lot of time don't 
you think it's reasonable to have a timeout like this? I am open to 
suggestions...


Line 196:       catalogLock_.writeLock().lock();
> - The only pattern I see for taking this write lock seems to be to be to ca
Good suggestion, but there is a place where we can't do that because the 
catalog lock is not only held for incrementing the version. See table and view 
rename.


Line 977:       tbl.getLock().unlock();
> could you add a precondition into all of the finally branches that make sur
Done


http://gerrit.cloudera.org:8080/#/c/5710/3/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
File fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java:

Line 194:  * Note: The getCatalogObjects() function is the only case where this 
locking pattern is
> it's not the only case *in principle* (maybe it is right now), because ever
Yes, what I mean is that this is the only case where both catalogLock_ and 
table locks are acquired and this pattern is not applied. Let me know if you 
prefer this comment rewritten.


Line 384:       catalog_.getLock().writeLock().unlock();
> We don't seem to be write-locking this after L378. Is this really required?
We are if this is not a rename operation.


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

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

Reply via email to