github-actions[bot] commented on code in PR #63310:
URL: https://github.com/apache/doris/pull/63310#discussion_r3436948233


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java:
##########
@@ -316,6 +326,7 @@ private void eraseDatabase(long currentTimeMs, int keepNum) 
{
                     if (dbInfo == null) {
                         continue;
                     }
+                    eraseTablesForDatabase(dbInfo);
                     Database db = dbInfo.getDb();

Review Comment:
   This fixes the normal expired-database path, but the parallel same-name 
database eviction path still bypasses this by-db cleanup. 
`eraseDatabaseWithSameName()` below still calls `eraseAllTables(dbInfo)`, which 
only removes tables listed in `RecycleDatabaseInfo`; that list is built from 
the tables present at database-drop time. Concrete sequence: drop table `t_old` 
from db `d`, later drop the remaining tables and db `d`, then exceed 
`max_same_name_catalog_trash_num` with more databases named `d`. The same-name 
eviction can log `OP_ERASE_DB` for the old db after min latency while `t_old` 
remains in `idToTable` with a missing db parent. This is distinct from the 
earlier normal-expired-db thread because that path now calls 
`eraseTablesForDatabase`, but the same-name db path still uses the old limited 
helper. Please route `eraseDatabaseWithSameName()` through the same db-id child 
cleanup and add a same-name database test.



-- 
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]

Reply via email to