Commit 610df53
authored
fix(l1): reduce spammy trace-level logs during snap-sync (#5492)
**Motivation**
Running ethrex with trace-level logs results in a lot of spam of "We
didn't get a peer from the table" or similar, due to busy loops we have
when we don't have many peers. This is especially important for the
first few stages, since we start with a small number of peers.
**Description**
This PR reduces the spam by adding a sleep of 10ms, plus a counter to
make the warning be printed only once every 1000 times (effectively once
every 10s). Also does the same in other stages of snap-sync, adding logs
in other busy loops to detect if/when we land in those cases instead of
silently ignoring them.1 parent 3797ce0 commit 610df53
File tree
5 files changed
+68
-21
lines changed- crates
- common/trie
- networking/p2p
- rlpx/connection
- sync
5 files changed
+68
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 141 | | |
153 | 142 | | |
154 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
340 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
341 | 350 | | |
342 | 351 | | |
343 | 352 | | |
| |||
656 | 665 | | |
657 | 666 | | |
658 | 667 | | |
| 668 | + | |
| 669 | + | |
659 | 670 | | |
660 | 671 | | |
661 | 672 | | |
| |||
736 | 747 | | |
737 | 748 | | |
738 | 749 | | |
739 | | - | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
740 | 758 | | |
741 | 759 | | |
742 | 760 | | |
| |||
974 | 992 | | |
975 | 993 | | |
976 | 994 | | |
| 995 | + | |
| 996 | + | |
977 | 997 | | |
978 | 998 | | |
979 | 999 | | |
| |||
1012 | 1032 | | |
1013 | 1033 | | |
1014 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1015 | 1043 | | |
1016 | 1044 | | |
1017 | 1045 | | |
| |||
1181 | 1209 | | |
1182 | 1210 | | |
1183 | 1211 | | |
| 1212 | + | |
| 1213 | + | |
1184 | 1214 | | |
1185 | 1215 | | |
1186 | 1216 | | |
| |||
1526 | 1556 | | |
1527 | 1557 | | |
1528 | 1558 | | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
1529 | 1567 | | |
1530 | 1568 | | |
1531 | 1569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| |||
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| |||
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| 323 | + | |
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
325 | 329 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | | - | |
332 | | - | |
333 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
0 commit comments