Skip to content

Commit

Permalink
fix(server): fix & remove unnecessary error logs on the server, updat…
Browse files Browse the repository at this point in the history
…e deps
  • Loading branch information
spetz committed Feb 20, 2025
1 parent 7c7f2e5 commit a1b2c7a
Show file tree
Hide file tree
Showing 43 changed files with 335 additions and 279 deletions.
58 changes: 29 additions & 29 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 bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ iggy = { path = "../sdk" }
iggy-bench-report = { path = "report" }
integration = { path = "../integration" }
nonzero_lit = "0.1.2"
serde = { version = "1.0.217", features = ["derive"] }
serde = { version = "1.0.218", features = ["derive"] }
sysinfo = "0.33.1"
tokio = { version = "1.43.0", features = ["full"] }
toml = "0.8.20"
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ login-session = ["dep:keyring"]

[dependencies]
ahash = { version = "0.8.11", features = ["serde"] }
anyhow = "1.0.95"
anyhow = "1.0.96"
clap = { version = "4.5.30", features = ["derive"] }
clap_complete = "4.5.45"
figlet-rs = "0.1.5"
Expand Down
6 changes: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ path = "src/stream-builder/stream-producer-config/main.rs"

[dependencies]
ahash = { version = "0.8.11", features = ["serde"] }
anyhow = "1.0.95"
anyhow = "1.0.96"
bytes = "1.10.0"
clap = { version = "4.5.30", features = ["derive"] }
futures-util = "0.3.31"
iggy = { path = "../sdk" }
rand = "0.9.0"
serde = { version = "1.0.217", features = ["derive", "rc"] }
serde_json = "1.0.138"
serde = { version = "1.0.218", features = ["derive", "rc"] }
serde_json = "1.0.139"
tokio = { version = "1.43.0", features = ["full"] }
tracing = { version = "0.1.41" }
tracing-subscriber = { version = "0.3.19", features = ["fmt", "env-filter"] }
10 changes: 5 additions & 5 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ readme = "../README.md"
[dependencies]
aes-gcm = "0.10.3"
ahash = { version = "0.8.11", features = ["serde"] }
anyhow = "1.0.95"
anyhow = "1.0.96"
async-broadcast = { version = "0.7.2" }
async-dropper = { version = "0.3.1", features = ["tokio", "simple"] }
async-trait = "0.1.86"
Expand Down Expand Up @@ -51,8 +51,8 @@ reqwest = { version = "0.12.12", default-features = false, features = [
reqwest-middleware = { version = "0.4.0", features = ["json"] }
reqwest-retry = "0.7.0"
rustls = { version = "0.23.23", features = ["ring"] }
serde = { version = "1.0.217", features = ["derive", "rc"] }
serde_json = "1.0.138"
serde = { version = "1.0.218", features = ["derive", "rc"] }
serde_json = "1.0.139"
serde_with = { version = "3.12.0", features = ["base64"] }
strum = { version = "0.27.1", features = ["derive"] }
thiserror = "2.0.11"
Expand All @@ -66,8 +66,8 @@ webpki-roots = { version = "0.26.8" }

[build-dependencies]
convert_case = "0.7.1"
serde = { version = "1.0.217", features = ["derive", "rc"] }
serde_derive = "1.0.217"
serde = { version = "1.0.218", features = ["derive", "rc"] }
serde_derive = "1.0.218"

[features]
default = ["tokio_lock"]
Expand Down
10 changes: 5 additions & 5 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.4.209"
version = "0.4.210"
edition = "2021"
build = "src/build.rs"
license = "Apache-2.0"
Expand All @@ -13,7 +13,7 @@ mimalloc = ["dep:mimalloc"]

[dependencies]
ahash = { version = "0.8.11" }
anyhow = "1.0.95"
anyhow = "1.0.96"
async_zip = { version = "0.0.17", features = [
"tokio",
"lzma",
Expand Down Expand Up @@ -76,8 +76,8 @@ ring = "0.17.9"
rust-s3 = { version = "0.35.1", features = ["default"] }
rustls = { version = "0.23.23" }
rustls-pemfile = "2.2.0"
serde = { version = "1.0.217", features = ["derive", "rc"] }
serde_json = "1.0.138"
serde = { version = "1.0.218", features = ["derive", "rc"] }
serde_json = "1.0.139"
serde_with = { version = "3.12.0", features = ["base64", "macros"] }
static-toml = "1.3.0"
strum = { version = "0.27.1", features = ["derive"] }
Expand Down Expand Up @@ -106,7 +106,7 @@ mockall = "0.13.1"

[build-dependencies]
figment = { version = "0.10.19", features = ["json", "toml", "env"] }
serde_json = "1.0.138"
serde_json = "1.0.139"
vergen-git2 = { version = "1.0.5", features = [
"build",
"cargo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub async fn handle(
&command.group_id,
)
.await.with_error_context(|_| format!(
"{COMPONENT} - failed to delete consumer group for stream_id: {}, topic_id: {}, group_id: {:?}, session: {}",
command.stream_id, command.topic_id, command.group_id, session
"{COMPONENT} - failed to delete consumer group with ID: {} for topic with ID: {} in stream with ID: {} for session: {}",
command.group_id, command.topic_id, command.stream_id, session
))?;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ pub async fn handle(
) -> Result<(), IggyError> {
debug!("session: {session}, command: {command}");
let system = system.read().await;
let consumer_group = system.get_consumer_group(
let Some(consumer_group) = system.get_consumer_group(
session,
&command.stream_id,
&command.topic_id,
&command.group_id,
);
if consumer_group.is_err() {
)?
else {
sender.send_empty_ok_response().await?;
return Ok(());
}
};

let consumer_group = consumer_group?.read().await;
let consumer_group = consumer_group.read().await;
let consumer_group = mapper::map_consumer_group(&consumer_group).await;
sender.send_ok_response(&consumer_group).await?;
Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pub async fn handle(
command.partition_id,
)
.await
.with_error_context(|_| format!("{COMPONENT} - failed to delete consumer offset for stream_id: {}, topic_id: {}, partition_id: {:?}, session: {}",
command.stream_id, command.topic_id, command.partition_id, session
.with_error_context(|_| format!("{COMPONENT} - failed to delete consumer offset for topic with ID: {} in stream with ID: {} partition ID: {:#?}, session: {}",
command.topic_id, command.stream_id, command.partition_id, session
))?;
sender.send_empty_ok_response().await?;
Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ pub async fn handle(
) -> Result<(), IggyError> {
debug!("session: {session}, command: {command}");
let system = system.read().await;
let offset = system
let Some(offset) = system
.get_consumer_offset(
session,
&command.consumer,
&command.stream_id,
&command.topic_id,
command.partition_id,
)
.await;
if offset.is_err() {
sender.send_empty_ok_response().await?;
return Ok(());
}

let Some(offset) = offset? else {
.await?
else {
sender.send_empty_ok_response().await?;
return Ok(());
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ pub async fn handle(
.await
.with_error_context(|_| {
format!(
"{COMPONENT} - failed to delete partitions for stream_id: {}, topic_id: {}, session: {}",
stream_id, topic_id, session
"{COMPONENT} - failed to delete partitions for topic with ID: {topic_id} in stream with ID: {stream_id}, session: {session}",
)
})?;
}
Expand Down
4 changes: 2 additions & 2 deletions server/src/binary/handlers/streams/delete_stream_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub async fn handle(
.delete_stream(session, &command.stream_id)
.await
.with_error_context(|_| {
format!("{COMPONENT} - failed to delete stream with id: {stream_id}, session: {session}")
format!("{COMPONENT} - failed to delete stream with ID: {stream_id}, session: {session}")
})?;
}

Expand All @@ -33,7 +33,7 @@ pub async fn handle(
.apply(session.get_user_id(), EntryCommand::DeleteStream(command))
.await
.with_error_context(|_| {
format!("{COMPONENT} - failed to apply delete stream with id: {stream_id}, session: {session}")
format!("{COMPONENT} - failed to apply delete stream with ID: {stream_id}, session: {session}")
})?;
sender.send_empty_ok_response().await?;
Ok(())
Expand Down
Loading

0 comments on commit a1b2c7a

Please # to comment.