Commit 711cfb5
[fix] Ensure Badger maintenance is stopped before existing Close() (jaegertracing#7940)
This PR adds synchronization between the Badger storage factory’s
background goroutines and store shutdown.
During shutdown (for example, pod termination or process restart), the
maintenance or metrics goroutines may still be running while the Badger
store is being closed. This change ensures the goroutines are allowed to
exit cleanly after shutdown is signaled and before the store is closed.
The behavior and APIs remain unchanged; the update only makes the
shutdown sequence safer and more predictable.
Thanks for taking a look, and please let me know if any adjustments are
needed.
Signed-off-by: Yashika0724 <ssyashika1311@gmail.com>1 parent 782b69f commit 711cfb5
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
124 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
165 | 174 | | |
166 | 175 | | |
167 | 176 | | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| |||
0 commit comments