Commit ad57606
committed
raftstorebench: prevent iter use-after-close
The `statsLoop` could still be running. In the linked test flake below, we see
it call `(*pebble).GetMetrics` when the engines are already closed.
Rearrange the code so that we wait for `statsLoop` to terminate properly before exiting the test.
Closes cockroachdb#156138.
Epic: none1 parent f85add6 commit ad57606
1 file changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| 72 | + | |
66 | 73 | | |
| 74 | + | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
| |||
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
90 | | - | |
91 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
0 commit comments