ryanzryu commented on code in PR #26740:
URL: https://github.com/apache/doris/pull/26740#discussion_r1390763496
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -1559,6 +1559,10 @@ private void transferToNonMaster(FrontendNodeType
newType) {
MetricRepo.init();
+ if (analysisManager != null) {
+ analysisManager.getStatisticsCache().preHeat();
Review Comment:
I am not clear know about the component you mentioned "master changed". I
searched the newest code of the 2.0 and master branches and found that
transferToNonMaster is called in several situations:
/*
* INIT -> MASTER: transferToMaster
* INIT -> FOLLOWER/OBSERVER: transferToNonMaster
* UNKNOWN -> MASTER: transferToMaster
* UNKNOWN -> FOLLOWER/OBSERVER: transferToNonMaster
* FOLLOWER -> MASTER: transferToMaster
* FOLLOWER/OBSERVER -> INIT/UNKNOWN: set isReady to
false
*/
I add 'analysisManager.getStatisticsCache().preHeat()' to
transferToNonMaster because I found it has already added in transferToMaster
but not in transferToNonMaster.
Add both of them are called in createStateListener function when Env init.
--
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]