Skip to content

Commit

Permalink
Merge pull request #474 from weibocom/info_panic
Browse files Browse the repository at this point in the history
panic时输出辅助信息
  • Loading branch information
parabala authored Jul 8, 2024
2 parents b370841 + 1784d0c commit 4b263b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion discovery/src/dns/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,16 @@ impl DnsCache {
let chunk = (len + (PERIOD - 1)) / PERIOD;
// 因为chunk是动态变化的,所以不能用last_idx + chunk
let end = ((ith + 1) * chunk).min(len);
assert!(self.last_idx <= end);
assert!(
self.last_idx <= end,
"addr:{:p} last_idx:{}, end:{}, len:{}, ith:{} chunk:{}",
&self,
self.last_idx,
end,
len,
ith,
chunk
);
let iter = self.hosts.hosts[self.last_idx..end].iter_mut();
self.last_idx = end;
if self.last_idx == len {
Expand Down

0 comments on commit 4b263b3

Please sign in to comment.