mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
better rpc id debugging
This commit is contained in:
parent
87958eedde
commit
c7d698f211
@ -599,6 +599,7 @@ impl RPCProcessor {
|
|||||||
waitable_reply: WaitableReply,
|
waitable_reply: WaitableReply,
|
||||||
debug_string: String,
|
debug_string: String,
|
||||||
) -> Result<TimeoutOr<(RPCMessage, TimestampDuration)>, RPCError> {
|
) -> Result<TimeoutOr<(RPCMessage, TimestampDuration)>, RPCError> {
|
||||||
|
let id = waitable_reply.handle.id();
|
||||||
let out = self
|
let out = self
|
||||||
.unlocked_inner
|
.unlocked_inner
|
||||||
.waiting_rpc_table
|
.waiting_rpc_table
|
||||||
@ -606,7 +607,7 @@ impl RPCProcessor {
|
|||||||
.await;
|
.await;
|
||||||
match &out {
|
match &out {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log_rpc!(debug "RPC Lost ({}): {}", debug_string, e);
|
log_rpc!(debug "RPC Lost (id={} {}): {}", id, debug_string, e);
|
||||||
self.record_question_lost(
|
self.record_question_lost(
|
||||||
waitable_reply.send_ts,
|
waitable_reply.send_ts,
|
||||||
waitable_reply.node_ref.clone(),
|
waitable_reply.node_ref.clone(),
|
||||||
@ -616,7 +617,7 @@ impl RPCProcessor {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
Ok(TimeoutOr::Timeout) => {
|
Ok(TimeoutOr::Timeout) => {
|
||||||
log_rpc!(debug "RPC Lost ({}): Timeout", debug_string);
|
log_rpc!(debug "RPC Lost (id={} {}): Timeout", id, debug_string);
|
||||||
self.record_question_lost(
|
self.record_question_lost(
|
||||||
waitable_reply.send_ts,
|
waitable_reply.send_ts,
|
||||||
waitable_reply.node_ref.clone(),
|
waitable_reply.node_ref.clone(),
|
||||||
|
@ -11,6 +11,16 @@ where
|
|||||||
result_receiver: Option<flume::Receiver<(Span, T)>>,
|
result_receiver: Option<flume::Receiver<(Span, T)>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T, C> OperationWaitHandle<T, C>
|
||||||
|
where
|
||||||
|
T: Unpin,
|
||||||
|
C: Unpin + Clone,
|
||||||
|
{
|
||||||
|
pub fn id(&self) -> OperationId {
|
||||||
|
self.op_id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T, C> Drop for OperationWaitHandle<T, C>
|
impl<T, C> Drop for OperationWaitHandle<T, C>
|
||||||
where
|
where
|
||||||
T: Unpin,
|
T: Unpin,
|
||||||
|
Loading…
Reference in New Issue
Block a user