mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-14233: Fix unexpected Kudu table drop attempt on external table creation failure
The existing code incorrectly attempts to drop the corresponding Kudu table when the creation of a Kudu external table in HMS fails due to an erroneous negation in the if condition (fortunately, there are additional checks with Preconditions in KuduCatalogOpExecutor.dropTable, causing such attempts to always fail). Additionally, when creating a Kudu synchronized table, if the table creation fails in HMS, it will unexpectedly skip deleting the corresponding Kudu table, resulting in an "already exists in Kudu" error when retrying the table creation. Removed the incorrect negation in the if condition to align with the intended behavior described in the comment. Testing: - Existing tests cover this change. Change-Id: I67d1cb333526fa41f247757997a6f7cf60d26c0b Reviewed-on: http://gerrit.cloudera.org:8080/23181 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
f0757418c8
commit
e7676223df
@@ -4043,7 +4043,7 @@ public class CatalogOpExecutor {
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
// Error creating the table in HMS, drop the synchronized table from Kudu.
|
||||
if (!KuduTable.isSynchronizedTable(newTable)) {
|
||||
if (KuduTable.isSynchronizedTable(newTable)) {
|
||||
KuduCatalogOpExecutor.dropTable(newTable, /* if exists */ false,
|
||||
/* kudu_table_reserve_seconds */ 0, catalogTimeline);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user