Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 committed May 14, 2024
1 parent dc4f455 commit 7574105
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/datanode/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ impl<'a> DatanodeServiceBuilder<'a> {
if self.enable_http_service {
let http_server = HttpServerBuilder::new(self.opts.http.clone())
.with_metrics_handler(MetricsHandler)
.with_greptime_config_options(self.opts.to_toml().context(TomlFormatSnafu)?)
.with_greptime_config_options(
self.opts
.to_toml()
.map_err(Box::new)
.context(TomlFormatSnafu)?,
)
.build();
let addr: SocketAddr = self.opts.http.addr.parse().context(ParseAddrSnafu {
addr: &self.opts.http.addr,
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ where
let opts = self.opts.clone();
let instance = self.instance.clone();

let toml = opts.to_toml().context(TomlFormatSnafu)?;
let toml = opts.to_toml().map_err(Box::new).context(TomlFormatSnafu)?;
let opts: FrontendOptions = opts.into();

let handlers = ServerHandlers::default();
Expand Down
4 changes: 3 additions & 1 deletion src/meta-srv/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ impl MetasrvInstance {
let httpsrv = Arc::new(
HttpServerBuilder::new(opts.http.clone())
.with_metrics_handler(MetricsHandler)
.with_greptime_config_options(opts.to_toml().context(TomlFormatSnafu)?)
.with_greptime_config_options(
opts.to_toml().map_err(Box::new).context(TomlFormatSnafu)?,
)
.build(),
);
// put metasrv into plugins for later use
Expand Down

0 comments on commit 7574105

Please sign in to comment.