Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20648 )
Change subject: IMPALA-10987: Changing impala.disableHmsSync in Hive should not break event processing ...................................................................... Patch Set 5: (5 comments) http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java File fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java: http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@1535 PS5, Line 1535: // in case of table level alters from external systems it is better to do a full : // refresh eg. this could be due to as simple as adding a new parameter or a : // full blown adding or changing column type : // rename is already handled above nit: move this comment to L1543 ? http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@1560 PS5, Line 1560: as nit: "is" ? http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@1563 PS5, Line 1563: if (catalogOpExecutor_.addTableIfNotRemovedLater(getEventId(), msTbl_)) { If the db is just missing in the cache but exists in HMS, catalogOpExecutor_.addTableIfNotRemovedLater() throws DatabaseNotFoundException. However, we should add the db and the table if they actually exist in HMS. Can we add a following test case? * Create a new db in Hive so the db doesn't exist in catalogd's cache. * Create a new table with event sync disabled in Hive under this db. So the table is also missing in catalogd's cache. * Alter this table to enable event sync in Hive. When processing the ALTER_TABLE event, catalogd should not go into the error state and should be able to add the db with the table into the cache. http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@1578 PS5, Line 1578: is turned on this table nit: "is turned on for this table" http://gerrit.cloudera.org:8080/#/c/20648/5/fe/src/main/java/org/apache/impala/catalog/events/MetastoreEvents.java@1583 PS5, Line 1583: the table does not exist I think the table exists at this point but its createEventId >= this event id. This event should be skipped by isOlderEvent(). If we go here, it seems a bug. We should add the createEventId in the error message. -- To view, visit http://gerrit.cloudera.org:8080/20648 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37055990be49e91462ebc98aa97009ca768a0072 Gerrit-Change-Number: 20648 Gerrit-PatchSet: 5 Gerrit-Owner: Sai Hemanth Gantasala <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]> Gerrit-Comment-Date: Mon, 11 Dec 2023 12:45:27 +0000 Gerrit-HasComments: Yes
