impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimitris Tsirogiannis (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4020: Catalog update can fail due to database creation/deletion in hive
Date Mon, 29 Aug 2016 21:53:33 GMT
Dimitris Tsirogiannis has posted comments on this change.

Change subject: IMPALA-4020: Catalog update can fail due to database creation/deletion in

Patch Set 1:

File fe/src/main/java/com/cloudera/impala/catalog/

PS1, Line 568: try {
indentation if off by 2 :)

PS1, Line 590: msClient.getHiveClient().getAllTables(dbName)
What will happen if the database is dropped sometime before L588 and L590? I think we will
get into this state where the database that we know got dropped is added to the catalog. I
understand that we can't really ensure atomicity here but I think we should try to avoid creating
inconsistent states as much as possible. 

First of all, I would extract the logic of invalidating the database into a separate private
function. Then I would check if that 'invalidateDb' finished successfully or threw the exception
and in the latter case, I would clean up the catalog cache (if an entry was added). We don't
have to worry about concurrent operations because this function already has a write lock on
the catalog.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic228efbcceb9ef6c165d0d9aeef7202581e3e46a
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <>
Gerrit-Reviewer: Bharath Vissapragada <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-HasComments: Yes

View raw message