Skip to content

Commit

Permalink
try try fix madsim
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Aug 2, 2024
1 parent 272a4dd commit d52774a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 14 deletions.
62 changes: 51 additions & 11 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ rdkafka = { package = "madsim-rdkafka", version = "0.4.1", features = [
] }
hashbrown = { version = "0.14", features = ["ahash", "inline-more", "nightly"] }
criterion = { version = "0.5", features = ["async_futures"] }
tonic = { package = "madsim-tonic", version = "0.5" }
tonic = { package = "madsim-tonic", version = "0.5", git = "https://github.com/BugenZhao/madsim", rev = "20afe23b9a8c953cc111cc1f9d31f5da825ab8b9" }
tonic-build = { package = "madsim-tonic-build", version = "0.5" }
otlp-embedded = { git = "https://github.com/risingwavelabs/otlp-embedded", rev = "e6cd165b9bc85783b42c106e99186b86b73e3507" }
prost = { version = "0.13" }
Expand Down
1 change: 1 addition & 0 deletions src/common/metrics/src/monitor/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ where

// Compatibility implementation for hyper 0.14 ecosystem.
// Should be the same as those with imports from `http::Uri` and `hyper_util::client::legacy`.
// TODO(http-bump): remove this after there is no more dependency on hyper 0.14.
mod compat {
use http_02::Uri;
use hyper_014::client::connect::{Connected, Connection};
Expand Down
4 changes: 2 additions & 2 deletions src/compute/src/rpc/service/monitor_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ pub mod grpc_middleware {
use either::Either;
use futures::Future;
use tonic::body::BoxBody;
use tonic::server::NamedService;
use tower::{Layer, Service};

/// Manages the await-trees of `gRPC` requests that are currently served by the compute node.
Expand Down Expand Up @@ -478,7 +477,8 @@ pub mod grpc_middleware {
}
}

impl<S: NamedService> NamedService for AwaitTreeMiddleware<S> {
#[cfg(not(madsim))]
impl<S: tonic::server::NamedService> tonic::server::NamedService for AwaitTreeMiddleware<S> {
const NAME: &'static str = S::NAME;
}
}
1 change: 1 addition & 0 deletions src/rpc_client/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct TracingInjectChannel {
inner: tonic::transport::Channel,
}

#[cfg(not(madsim))]
impl Service<http::Request<BoxBody>> for TracingInjectChannel {
type Error = tonic::transport::Error;
type Response = http::Response<BoxBody>;
Expand Down

0 comments on commit d52774a

Please sign in to comment.