github-actions[bot] commented on code in PR #68849:
URL: https://github.com/apache/doris/pull/68849#discussion_r4235913857
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -3392,6 +3392,8 @@ private boolean createOlapTable(Database db,
CreateTableInfo createTableInfo) th
}
// register table, write create table edit log
result = db.createTableWithoutLock(olapTable, false,
createTableInfo.isIfNotExists());
+ // CTAS must skip INSERT when another creator registered the
table first.
+ tableHasExist = result.second;
Review Comment:
[P2] Recycle the losing cloud index before returning success. In cloud mode,
`afterCreatePartitions` has already called `commitMaterializedIndex` before
this duplicate result. That commit removes the prepared recycle-index marker,
but the `result.second` branch only deletes FE tablet/colocate entries; it
never calls `dropMaterializedIndex` for the loser's IDs. `recycle_indexes`
scans recycle-index markers, so each raced `IF NOT EXISTS` CTAS can leave an
unreachable committed index and its tablets permanently in MetaService even
though this return reports a successful no-op. Please explicitly drop/recycle
the losing cloud resources and report a cleanup failure rather than returning
`true`.
--
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]