Skip to content

Commit

Permalink
mark cfg(not(madsim))
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Sep 23, 2024
1 parent 33ac892 commit 5e6f549
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/common/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ normal = ["workspace-hack"]
[dependencies]
auto_impl = "1"
bytes = "1"
cfg-or-panic = "0.2"
clap = { workspace = true }
easy-ext = "1"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
Expand Down
3 changes: 3 additions & 0 deletions src/common/metrics/src/monitor/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use std::sync::LazyLock;
use std::task::{Context, Poll};
use std::time::Duration;

use cfg_or_panic::cfg_or_panic;
use futures::FutureExt;
use http::Uri;
use hyper_util::client::legacy::connect::dns::{GaiAddrs, GaiFuture, GaiResolver, Name};
Expand Down Expand Up @@ -591,6 +592,7 @@ impl Service<Name> for MonitoredGaiResolver {
}
}

#[cfg_or_panic(not(madsim))]
fn monitored_http_connector(
connection_type: impl Into<String>,
config: TcpConfig,
Expand All @@ -606,6 +608,7 @@ fn monitored_http_connector(
}

/// Attach general configurations to the endpoint.
#[cfg_or_panic(not(madsim))]
fn configure_endpoint(endpoint: Endpoint) -> Endpoint {
// This is to mitigate https://github.com/risingwavelabs/risingwave/issues/18039.
// TODO: remove this after https://github.com/hyperium/hyper/issues/3724 gets resolved.
Expand Down

0 comments on commit 5e6f549

Please sign in to comment.