File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed 
be/src/service/service_be Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -103,16 +103,18 @@ void start_be(const std::vector<StorePath>& paths, bool as_cn) {
103103    CHECK (global_vars->is_init ()) << " global variables not initialized"  ;
104104    LOG (INFO) << process_name << "  start step "   << start_step++ << " : global variables init successfully"  ;
105105
106-     auto * storage_engine = init_storage_engine (global_env, paths, as_cn);
107-     LOG (INFO) << process_name << "  start step "   << start_step++ << " : storage engine init successfully"  ;
108- 
106+     //  cache env should be initialized before init_storage_engine,
107+     //  because apply task is triggered in init_storage_engine and needs cache env.
109108    auto * cache_env = CacheEnv::GetInstance ();
110109    EXIT_IF_ERROR (cache_env->init (paths));
111110    LOG (INFO) << process_name << "  start step "   << start_step++ << " : cache env init successfully"  ;
112111
112+     auto * storage_engine = init_storage_engine (global_env, paths, as_cn);
113+     LOG (INFO) << process_name << "  start step "   << start_step++ << " : storage engine init successfully"  ;
114+ 
113115    auto * exec_env = ExecEnv::GetInstance ();
114116    EXIT_IF_ERROR (exec_env->init (paths, as_cn));
115-     LOG (INFO) << process_name << "  start step "   << start_step++ << " : exec engine  init successfully"  ;
117+     LOG (INFO) << process_name << "  start step "   << start_step++ << " : exec env  init successfully"  ;
116118
117119    //  Start all background threads of storage engine.
118120    //  SHOULD be called after exec env is initialized.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments