Tim Armstrong has posted comments on this change.

Change subject: IMPALA-4733: Avoid using several loading threads on one table.
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5707/1/fe/src/main/java/org/apache/impala/catalog/TableLoadingMgr.java
File fe/src/main/java/org/apache/impala/catalog/TableLoadingMgr.java:

Line 280:     tableLoadingSet_.remove(tblName);
> tableLoadingSet_ seems to be a synchronized (thread-safe) one?
Right, but there's no synchronisation across tableLoadingSet_ and 
loadingTable_. 

So if two threads are in here at the same time and get the same table, there's 
no guarantee that they don't both end up waiting. E.g. the following sequence 
of events is possible for two threads T1 and T2

T1: remove table1 from tableLoadingSet_
T2: remove table1 from tableLoadingSet_
T1: check loadingTables_ -> not present
T2: check loadingTables_ -> not present
T1: call getOrLoadTable() for table1
T2: call getOrLoadTable() for table1
... time elapses
load starts and table1 is added to loadingTables_


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idba5f1808e0b9cbbcf46245834d8ad38d01231cb
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-imp...@apache.org>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to