nextdreamblue commented on code in PR #13067:
URL: https://github.com/apache/doris/pull/13067#discussion_r996317757
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/CatalogRecycleBin.java:
##########
@@ -76,46 +81,56 @@ public synchronized boolean recycleDatabase(Database db,
Set<String> tableNames)
// db should be empty. all tables are recycled before
Preconditions.checkState(db.getTables().isEmpty());
- // erase db with same name
- eraseDatabaseWithSameName(db.getFullName());
+ // erase db with same id
+ eraseDatabaseWithSameId(db.getId());
// recycle db
- RecycleDatabaseInfo databaseInfo = new RecycleDatabaseInfo(db,
tableNames);
+ RecycleDatabaseInfo databaseInfo = new RecycleDatabaseInfo(db,
tableNames, tableIds);
idToDatabase.put(db.getId(), databaseInfo);
- idToRecycleTime.put(db.getId(), System.currentTimeMillis());
+ if (!isReplay || replayRecycleTime == 0) {
+ recycleTime = System.currentTimeMillis();
Review Comment:
yes, sometimes recycleTime can change when fe restart before saving
recycleTime to new image.
--
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]