Commit 2e493f4
Merge cockroachdb#157762
157762: apply: improve Asserter logging and error handling r=pav-kv a=miraradeva
Previously, the `Asserter` would panic if it found any discrepancy. This usually works as expected and the panic message in the test failure (e.g. kvnemesis). However, it's possible that the goroutine that invoked the `Asserter` is in a part of the code that doesn't check/recover from panics (e.g. the `defer` logic in `processRaftSnapshotRequest`).
This commit changes the panics to `log.Fatalf`s to have a better chance of logging these. It also improves one of the log messages in the `Asserter` to print out the log state in case of a discrepancy.
Closes: cockroachdb#157253
Release note: None
Co-authored-by: Mira Radeva <[email protected]>2 files changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
160 | | - | |
161 | | - | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | | - | |
246 | | - | |
| 248 | + | |
| 249 | + | |
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
| |||
368 | 371 | | |
369 | 372 | | |
370 | 373 | | |
371 | | - | |
372 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
| |||
410 | 414 | | |
411 | 415 | | |
412 | 416 | | |
413 | | - | |
| 417 | + | |
414 | 418 | | |
415 | 419 | | |
0 commit comments