linrrzqqq opened a new pull request, #67012: URL: https://github.com/apache/doris/pull/67012
### What problem does this PR solve? Problem Summary: `ProfileManager` periodically calls `loadProfilesFromStorageIfFirstTime(false)` after FE becomes ready. The method previously tracked only whether historical profiles had finished loading. Because the storage scan runs asynchronously, repeated calls made before the first scan completed could each create a new `profile-loader` thread. This resulted in concurrent and duplicated profile storage scans. This PR adds an atomic loading flag to ensure that only one historical profile loader can run at a time: - Atomically acquire the loading state before starting the loader. - Ignore repeated calls while a loader is running. - Clear the loading state after success or failure so failed loads can be retried. - Recheck the loaded state after acquiring the flag to handle the race where the previous loader finishes between the initial check and the CAS operation. The existing loading logic and synchronous waiting behavior remain unchanged. -- 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]
