Skip to content

Commit 5042543

Browse files
authored
Create ps_engine.raftlog if presents ps_engine (#367)
1 parent cafa770 commit 5042543

File tree

1 file changed

+15
-0
lines changed
  • proxy_components/proxy_server/src

1 file changed

+15
-0
lines changed

proxy_components/proxy_server/src/run.rs

+15
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,21 @@ impl<ER: RaftEngine, F: KvFormat> TiKvServer<ER, F> {
622622
info!("using proxy config"; "config" => ?proxy_config);
623623
crate::config::address_proxy_config(&mut config, &proxy_config);
624624
info!("after address config"; "config" => ?config);
625+
626+
// NOTE: Compat disagg arch upgraded from * to 8.0.
627+
{
628+
let raft_engine_path = config.raft_engine.config().dir + "/ps_engine";
629+
let path = Path::new(&raft_engine_path);
630+
if path.exists() {
631+
let new_raft_engine_path = config.raft_engine.config().dir + "/ps_engine.raftlog";
632+
let new_path = Path::new(&new_raft_engine_path);
633+
if !new_path.exists() {
634+
info!("creating ps_engine.raftlog for upgraded cluster");
635+
std::fs::File::create(new_path).unwrap();
636+
}
637+
}
638+
}
639+
625640
let cfg_controller = Self::init_config(config);
626641
let config = cfg_controller.get_current();
627642

0 commit comments

Comments
 (0)