Marcel Kornacker has posted comments on this change.

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


Patch Set 2:

(8 comments)

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

Line 184:   private static final long TIMEOUT_FOR_TBL_LOCK_IN_MSEC = 3600000;
an hour?

also, this doesn't need to be a sentence. something like tbl_lock_timeout_msec 
is equally informative.


Line 189:    * false otherwise.
point out which locks are held on return in both scenarios.


Line 191:   public boolean tryToAcquireCatalogLocks(Table tbl) {
how about something briefer like tryLockTable?


Line 205:       Thread.yield();
comment on significance of this. i'm assuming you need it to prevent spinning 
here.


Line 321:           tbl.getLock().lock();
does it make sense to have rw locks for tables as well? sounds like that might 
speed up 'show tables'.


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

Line 71:   // Lock protecting this table
explain why this is needed (why do we reacquire the lock when we already have 
it?). fine to do in a different class that already explains the overall locking 
pattern.


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

Line 173:  * ensures that the catalog lock is never held for a long period of 
time, preventing
this pattern only applies to single-table update operations, worth pointing out 
(which then also explains why getCatalogObjects() is different)


Line 3127:                 for (org.apache.hadoop.hive.metastore.api.Partition 
part:
single line


-- 
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: 2
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