mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 17:00:37 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user