Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 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 @@ -9,7 +9,7 @@ members = [
]

[workspace.package]
version = "0.34.2"
version = "0.34.3"


[workspace.lints.clippy]
Expand Down
13 changes: 9 additions & 4 deletions opsqueue/src/common/submission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ pub mod db {
};
use chunk::ChunkSize;
use sqlx::{query, query_as, Sqlite};
use tracing::{info, warn};

use axum_prometheus::metrics::{counter, histogram};

Expand Down Expand Up @@ -422,12 +421,18 @@ pub mod db {
// Forward our database errors to the caller.
Err(E::L(e)) => return Err(e),
// If the submission ID can't be found, that's too bad, but it's not our problem anymore i guess.
Err(E::R(_)) => warn!(%submission_id, "Presumed zero-length submission not found"),
Err(E::R(_)) => {
tracing::warn!(%submission_id, "Presumed zero-length submission not found")
}
// If everything went OK, this *could* still indicate a bug in producer code, so let's just log it.
// Our future selves might thank us.
Ok(true) => info!(%submission_id, "Zero-length submission marked as completed"),
Ok(true) => {
tracing::debug!(%submission_id, "Zero-length submission marked as completed")
}
// This should never happen. If it does, better log it.
Ok(false) => warn!(%submission_id, "Zero-length submission wasn't zero-length?!"),
Ok(false) => {
tracing::warn!(%submission_id, "Zero-length submission wasn't zero-length?!")
}
}
}
Ok(submission_id)
Expand Down
4 changes: 2 additions & 2 deletions opsqueue/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ impl DBPools {
}

/// Performas an explicit, non-passive WAL checkpoint
/// We use the 'TRUNCATE' strategy, which will do the most work but will briefly block the writer *and* all readers
/// We use the 'RESTART' strategy, which will do the most work but will briefly block the writer *and* all readers
///
/// c.f. https://www.sqlite.org/pragma.html#pragma_wal_checkpoint
pub async fn perform_explicit_wal_checkpoint(&self) -> sqlx::Result<()> {
let mut conn = self.writer_conn().await?;
let res: (i32, i32, i32) = sqlx::query_as("PRAGMA wal_checkpoint(RESTART);")
.fetch_one(conn.get_inner())
.await?;
tracing::warn!("WAL checkpoint completed {res:?}");
tracing::debug!("WAL checkpoint completed {res:?}");
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion opsqueue/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub fn build_router(
let _ = span.set_parent(crate::tracing::context_from_headers(request.headers()));
span
})
.on_response(tower_http::trace::DefaultOnResponse::new().level(tracing::Level::INFO));
.on_response(tower_http::trace::DefaultOnResponse::new().level(tracing::Level::DEBUG));

let traced_routes = routes.layer(tracing_middleware).layer(prometheus_config.0);

Expand Down
Loading