924060929 commented on code in PR #68238:
URL: https://github.com/apache/doris/pull/68238#discussion_r4079369597
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/RefreshManager.java:
##########
@@ -260,6 +265,13 @@ public void refreshTableInternal(ExternalDatabase db,
ExternalTable table, long
table.getName(), table.getId(), db.getFullName(),
db.getCatalog().getName(), updateTime);
}
+ private void invalidatePaimonCatalogForUnresolvedReplay(ExternalCatalog
catalog) {
+ if (catalog instanceof PaimonExternalCatalog) {
+ Env.getCurrentEnv().getExtMetaCacheMgr()
Review Comment:
Fixed in 9a8ab6bda44b9c12cf5e9b8ae0ade0942d23b264. replayRefreshCatalog,
replayRefreshDb, and replayRefreshTable now run their cache invalidation
through replayRefreshSafely, which catches and logs failures so a
CacheException from catalog/database/table invalidation cannot escape into
EditLog's fatal replay handler. Added RefreshManagerReplayTest with injected
catalog, database, and table invalidation failures.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonMetadataOps.java:
##########
@@ -358,11 +395,38 @@ private void performDropTable(String dBName, String
tableName, boolean ifExists)
@Override
public void afterDropTable(String dbName, String tblName) {
Optional<ExternalDatabase<?>> db = dorisCatalog.getDbForReplay(dbName);
- db.ifPresent(externalDatabase ->
externalDatabase.unregisterTable(tblName));
+ try {
+ if (db.isPresent()) {
+ boolean invalidated =
db.get().unregisterTableForReplay(tblName);
Review Comment:
Fixed in 9a8ab6bda44b9c12cf5e9b8ae0ade0942d23b264. When a resolved
database's table cannot be resolved on replay (for example a lost
lower_case_table_names=2 table mapping), afterDropTable and replayRefreshTable
now retire the database's retained legacy table objects via
ExternalDatabase.retireAllTableObjectsWithoutEngineInvalidation() before
flushing the engine group, so a same-name recreation cannot reuse the prior
table incarnation. Added
testMode2LostTableMappingDropRetiresCanonicalTableObject.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]