Skip to content

Commit

Permalink
Improve queries routing logging
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Oct 18, 2024
1 parent f51a5fd commit 145d8ee
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions zenoh/src/net/routing/dispatcher/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,11 @@ impl Timed for QueryCleanup {
{
drop(queries_lock);
tracing::warn!(
"Didn't receive final reply {}:{} from {}: Timeout({:#?})!",
query.0.src_face,
self.qid,
"Didn't receive final reply {}:{} for {}:{}: Timeout({:#?})!",
face,
self.qid,
query.0.src_face,
query.0.src_qid,
self.timeout,
);
finalize_pending_query(query);
Expand Down Expand Up @@ -602,18 +603,26 @@ pub fn route_query(
ext_tstamp: None,
});
} else {
for ((outface, key_expr, context), qid) in route.values() {
QueryCleanup::spawn_query_clean_up_task(outface, tables_ref, *qid, timeout);
for ((outface, key_expr, context), outqid) in route.values() {
QueryCleanup::spawn_query_clean_up_task(
outface, tables_ref, *outqid, timeout,
);
#[cfg(feature = "stats")]
if !admin {
inc_req_stats!(outface, tx, user, body)
} else {
inc_req_stats!(outface, tx, admin, body)
}

tracing::trace!("Propagate query {}:{} to {}", face, qid, outface);
tracing::trace!(
"Propagate query {}:{} to {}:{}",
face,
qid,
outface,
outqid
);
outface.primitives.send_request(Request {
id: *qid,
id: *outqid,
wire_expr: key_expr.into(),
ext_qos,
ext_tstamp,
Expand Down Expand Up @@ -711,19 +720,15 @@ pub(crate) fn route_send_response_final(
Some(query) => {
drop(queries_lock);
tracing::debug!(
"Received final reply {}:{} from {}",
query.0.src_face,
"Received final reply {}:{} for {}:{}",
face,
qid,
face
query.0.src_face,
query.0.src_qid,
);
finalize_pending_query(query);
}
None => tracing::warn!(
"Route final reply {}:{} from {}: Query not found!",
face,
qid,
face
),
None => tracing::warn!("Route final reply {}:{}: Query not found!", face, qid,),
}
}

Expand Down

0 comments on commit 145d8ee

Please sign in to comment.