Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15260 )

Change subject: IMPALA-9357: Fix race condition in alter_database event
......................................................................


Patch Set 7: Code-Review+1

(1 comment)

Have another look for deadlocks. I think it's ok since we always keep the lock 
acquiring order:

 catalog version lock -> db object lock -> functions lock
 catalog version lock -> table lock
 metastoreDdlLock_ -> functions lock (in RefreshFunctions)

Also, there are no operations requiring both db-object lock and table lock. 
However, it'd be better to add test coverage for concurrent ddls (especially db 
related ddls) in tests/custom_cluster/test_concurrent_ddls.py

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

http://gerrit.cloudera.org:8080/#/c/15260/7/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java@244
PS7, Line 244:  * Operations that CREATE/DROP catalog objects such as tables 
and databases employ the
We should mention that CREATE/DROP functions are now not following this rule. 
They require holding the db object lock since they will modify db's hms object 
(addCatalogServiceIdentifiers) and db's inflight event list 
(addVersionsForInflightEvents). They don't require the metastoreDdlLock_ since 
functions are associated to a db. Adding/deleting functions in different db 
don't need to block each other.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I472fd8a55740769ee5cdb84e48422a4ab39a8d1e
Gerrit-Change-Number: 15260
Gerrit-PatchSet: 7
Gerrit-Owner: Vihang Karajgaonkar <[email protected]>
Gerrit-Reviewer: Anurag Mantripragada <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>
Gerrit-Comment-Date: Mon, 09 Mar 2020 08:03:51 +0000
Gerrit-HasComments: Yes

Reply via email to