Skip to content

Commit

Permalink
[Enhancement] Catch more exceptions when executing dynamic partition
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy committed Sep 29, 2024
1 parent dcd238e commit a4f3229
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public boolean executeDynamicPartitionForTable(Long dbId, Long tableId) {
}
dropPartitionClauses = getDropPartitionClause(db, olapTable, partitionColumn, partitionFormat);
tableName = olapTable.getName();
} catch (Exception e) {
} catch (Throwable e) {
LOG.warn("create or drop partition failed", e);
recordCreatePartitionFailedMsg(db.getOriginName(), olapTable.getName(), e.getMessage());
return false;
Expand All @@ -458,7 +458,7 @@ public boolean executeDynamicPartitionForTable(Long dbId, Long tableId) {

GlobalStateMgr.getCurrentState().getLocalMetastore().dropPartition(db, olapTable, dropPartitionClause);
clearDropPartitionFailedMsg(tableName);
} catch (DdlException e) {
} catch (Throwable e) {
recordDropPartitionFailedMsg(db.getOriginName(), tableName, e.getMessage());
} finally {
locker.unLockDatabase(db.getId(), LockType.WRITE);
Expand All @@ -474,7 +474,7 @@ public boolean executeDynamicPartitionForTable(Long dbId, Long tableId) {
GlobalStateMgr.getCurrentState().getLocalMetastore().addPartitions(ctx,
db, tableName, addPartitionClause);
clearCreatePartitionFailedMsg(tableName);
} catch (DdlException e) {
} catch (Throwable e) {
recordCreatePartitionFailedMsg(db.getOriginName(), tableName, e.getMessage());
}
}
Expand Down

0 comments on commit a4f3229

Please sign in to comment.