github-actions[bot] commented on code in PR #66913:
URL: https://github.com/apache/doris/pull/66913#discussion_r4059221546
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java:
##########
@@ -337,23 +330,23 @@ public void afterDropDb(String dbName) {
@Override
public boolean createTableImpl(CreateTableInfo createTableInfo) throws
UserException {
try {
- return executionAuthenticator.execute(() ->
performCreateTable(createTableInfo));
+ return executeCatalogOperation(() ->
performCreateTable(createTableInfo));
} catch (Exception e) {
throw new DdlException(
"Failed to create table: " + createTableInfo.getTableName() +
", error message is:" + e.getMessage(),
e);
}
}
- public boolean performCreateTable(CreateTableInfo createTableInfo) throws
UserException {
+ private boolean performCreateTable(CreateTableInfo createTableInfo) throws
UserException {
String dbName = createTableInfo.getDbName();
- ExternalDatabase<?> db = dorisCatalog.getDbNullable(dbName);
+ ExternalDatabase<?> db = getDatabaseWithinCatalogGeneration(dbName);
Review Comment:
[P1] Keep the collision lookup on this catalog generation
`executeCatalogOperation()` retains G1, but this returns a mutable Doris
database and releases the catalog monitor. A concurrent ALTER can invalidate
that database; the later `db.getTableNullable()` reinitializes/list-enumerates
through live G2, while `tableExistsInternal()` and the eventual create still
use retained G1. With case-insensitive names, a G2-only collision can wrongly
reject the create, or a G1-only case-fold collision can be missed and `TBL1`
created beside `tbl1` on G1. Please derive the local collision check from the
retained catalog generation and cover native/HMS reset barriers.
--
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]