Bharath Vissapragada has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13904 )

Change subject: IMPALA-8434: retain tables and functions in altering database
......................................................................


Patch Set 2:

(1 comment)

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

http://gerrit.cloudera.org:8080/#/c/13904/2/fe/src/main/java/org/apache/impala/catalog/ImpaladCatalog.java@394
PS2, Line 394:  CatalogObjectVersionSet.INSTANCE.updateVersions(
             :             existingDb.getCatalogVersion(), catalogVersion);
             :         
CatalogObjectVersionSet.INSTANCE.removeAll(existingDb.getTables());
             :         CatalogObjectVersionSet.INSTANCE.removeAll(
             :             existingDb.getFunctions(null, new PatternMatcher()));
             :         // IMPALA-8434: add back the existing tables/functions. 
Note that their version
             :         // counters in CatalogObjectVersionSet have been 
decreased by the above removeAll
             :         // statements, meaning their references from the old db 
are deleted since the old
             :         // db object has been replaced by newDb.
             :         for (Table tbl: existingDb.getTables()) {
             :           newDb.addTable(tbl);
             :         }
This looks buggy to me. What does it mean to have tables in the db, without 
having their version number maintained in the CatalogObjectVersionSet ? Aren't 
we breaking the invariant that CatalogObjectVersionSet can get the correct min 
version across all the objects (invalidate metadata relies on it)? or am I 
misunderstanding something?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3dc9857fd2733e20cf10fbe17bb1a4670d7d015
Gerrit-Change-Number: 13904
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Jul 2019 05:09:09 +0000
Gerrit-HasComments: Yes

Reply via email to