Skip to content

Commit 3fe44e1

Browse files
ylw510yanglongwei
andauthored
print response_limit and stale_resps (#608)
Co-authored-by: yanglongwei <yanglongwei@bonree.com>
1 parent f96ce3e commit 3fe44e1

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

src/peer.cxx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,22 @@ void peer::handle_rpc_result( ptr<peer> myself,
124124
if (stale_resps < limit) {
125125
p_wn( "[EDGE CASE] got stale RPC response from %d: "
126126
"current %p (%" PRIu64 "), from parameter %p (%" PRIu64 "). "
127-
"will ignore this response",
127+
"will ignore this response."
128+
"Currently, stale_resps: %d, response_limit: %d",
128129
config_->get_id(),
129130
rpc_.get(),
130131
cur_rpc_id,
131132
my_rpc_client.get(),
132-
given_rpc_id );
133+
given_rpc_id,
134+
stale_resps,
135+
limit );
133136
} else if (stale_resps == limit) {
134137
p_wn( "[EDGE CASE] too verbose stale RPC response from peer %d, "
135-
"will suppress it from now", config_->get_id() );
138+
"will suppress it from now."
139+
"Currently, stale_resps: %d, response_limit: %d",
140+
config_->get_id(),
141+
stale_resps,
142+
limit );
136143
}
137144

138145
} else {
@@ -206,15 +213,22 @@ void peer::handle_rpc_result( ptr<peer> myself,
206213
if (stale_resps < limit) {
207214
p_wn( "[EDGE CASE] RPC for %d has been reset before "
208215
"returning error: current %p (%" PRIu64
209-
"), from parameter %p (%" PRIu64 ")",
216+
"), from parameter %p (%" PRIu64 ")."
217+
"Currently, stale_resps: %d, response_limit: %d",
210218
config_->get_id(),
211219
rpc_.get(),
212220
cur_rpc_id,
213221
my_rpc_client.get(),
214-
given_rpc_id );
222+
given_rpc_id,
223+
stale_resps,
224+
limit );
215225
} else if (stale_resps == limit) {
216226
p_wn( "[EDGE CASE] too verbose stale RPC response from peer %d, "
217-
"will suppress it from now", config_->get_id() );
227+
"will suppress it from now."
228+
"Currently, stale_resps: %d, response_limit: %d",
229+
config_->get_id(),
230+
stale_resps,
231+
limit );
218232
}
219233
}
220234
}

0 commit comments

Comments
 (0)