hello-stephen commented on code in PR #71394:
URL: https://github.com/apache/doris/pull/71394#discussion_r4794556345


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/Auth.java:
##########
@@ -820,38 +812,6 @@ private void dropUserInternal(UserIdentity userIdent, 
boolean ignoreIfNonExists,
         } finally {
             writeUnlock();
         }
-
-        if (Config.isNotCloudMode()) {
-            LOG.info("run in non-cloud mode, does not need notify Ms");
-            return;
-        }
-
-        String reason = String.format("drop user notify to meta service, 
userName [%s], userId [%s]",
-                mysqlUserName, toDropMysqlUserId);
-        LOG.info(reason);
-        int retryTime = 0;
-        // if notify ms failed, at least wait 5 mins, default 1 day
-        int maxRetryTimes = Config.drop_user_notify_ms_max_times > 300 ? 
Config.drop_user_notify_ms_max_times : 300;
-        while (retryTime < maxRetryTimes) {
-            try {
-                ((CloudInternalCatalog) 
Env.getCurrentInternalCatalog()).dropStage(Cloud.StagePB.StageType.INTERNAL,

Review Comment:
   [P2] Reclaim legacy internal stages when their owners are dropped
   
   After the last FE is upgraded, dropping a user who already has an internal 
stage no longer calls `drop_stage`. `recycle_expired_stage_objects` expires 
files from live stages, and `recycle_stage` can only process records queued by 
`drop_stage`, so the stage stays in `InstanceInfoPB.stages` and still counts 
against `max_num_stages` (40 by default). An older FE restarted from a 
checkpoint taken after the drop can hit that limit even after the files expire. 
Preserve cleanup for legacy internal stages or migrate the stage records during 
retirement.



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