Skip to content

Commit

Permalink
dekaf: Test whether initial_connection_window_size fixes the channe…
Browse files Browse the repository at this point in the history
…l timeout issue
  • Loading branch information
jshearer committed Oct 7, 2024
1 parent 1896afc commit ff49c49
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
30 changes: 15 additions & 15 deletions crates/flow-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,24 @@ impl Client {
user_access_token: Option<String>,
user_refresh_token: Option<RefreshToken>,
) -> Self {
// Test whether a fresh set of Gazette clients solves the timeout issue
let router = gazette::Router::new("local");

let journal_client = gazette::journal::Client::new(
String::new(),
gazette::Metadata::default(),
router.clone(),
);
let shard_client = gazette::shard::Client::new(
String::new(),
gazette::Metadata::default(),
router.clone(),
);
// // Test whether a fresh set of Gazette clients solves the timeout issue
// let router = gazette::Router::new("local");

// let journal_client = gazette::journal::Client::new(
// String::new(),
// gazette::Metadata::default(),
// router.clone(),
// );
// let shard_client = gazette::shard::Client::new(
// String::new(),
// gazette::Metadata::default(),
// router.clone(),
// );
Self {
user_access_token: user_access_token.or(self.user_access_token),
user_refresh_token: user_refresh_token.or(self.user_refresh_token),
journal_client,
shard_client,
// journal_client,
// shard_client,
..self
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/gazette/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ pub async fn dial_channel(endpoint: &str) -> Result<tonic::transport::Channel> {
.connect_timeout(Duration::from_secs(5))
.keep_alive_timeout(Duration::from_secs(120))
.keep_alive_while_idle(true)
.initial_connection_window_size(i32::MAX as u32)
.tls_config(
tonic::transport::ClientTlsConfig::new()
.with_native_roots()
Expand Down

0 comments on commit ff49c49

Please sign in to comment.