feat(frontend): migrate insert to region server (#2318)

* feat(frontend): migrate insert to region server

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: move converter to Inserter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: rename convert function

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: add span id

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: compilation

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* retrigger action

* retrigger action

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
This commit is contained in:
Zhenchi
2023-09-05 11:23:54 +08:00
committed by Ruihang Xia
parent 3eccb36047
commit 7dde9ce3ce
22 changed files with 837 additions and 609 deletions

View File

@@ -398,6 +398,7 @@ pub struct Datanode {
opts: DatanodeOptions,
services: Option<Services>,
heartbeat_task: Option<HeartbeatTask>,
region_server: RegionServer,
}
impl Datanode {
@@ -434,7 +435,9 @@ impl Datanode {
Mode::Standalone => None,
};
let heartbeat_task = match opts.mode {
Mode::Distributed => Some(HeartbeatTask::try_new(&opts, Some(region_server)).await?),
Mode::Distributed => {
Some(HeartbeatTask::try_new(&opts, Some(region_server.clone())).await?)
}
Mode::Standalone => None,
};
@@ -442,6 +445,7 @@ impl Datanode {
opts,
services,
heartbeat_task,
region_server,
})
}
@@ -483,6 +487,10 @@ impl Datanode {
Ok(())
}
pub fn region_server(&self) -> RegionServer {
self.region_server.clone()
}
// internal utils
/// Build [RaftEngineLogStore]