Repository navigation
Commit 069a7e1
authored
core/rawdb: stop freezer process as part of freezer.Close() (#21010)
* core/rawdb: Stop freezer process as part of freezer.Close()
When you call db.Close(), it was closing the leveldb database first,
then closing the freezer, but never stopping the freezer process.
This could cause the freezer to attempt to write to leveldb after
leveldb had been closed, leading to a crash with a non-zero exit code.
This change adds a quit channel to the freezer, and freezer.Close()
will not return until the freezer process has stopped.
Additionally, when you call freezerdb.Close(), it will close the
AncientStore before closing leveldb, to ensure that the freezer goroutine
will be stopped before leveldb is closed.
* core/rawdb: Fix formatting for golint
* core/rawdb: Use backoff flag to avoid repeating select
* core/rawdb: Include accidentally omitted backoff1 parent bd60295 commit 069a7e1
2 files changed
Lines changed: 26 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
| 260 | + | |
257 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
258 | 276 | | |
259 | 277 | | |
260 | 278 | | |
261 | 279 | | |
262 | | - | |
| 280 | + | |
263 | 281 | | |
264 | 282 | | |
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
269 | | - | |
| 287 | + | |
270 | 288 | | |
271 | 289 | | |
272 | 290 | | |
273 | 291 | | |
274 | | - | |
| 292 | + | |
275 | 293 | | |
276 | 294 | | |
277 | 295 | | |
278 | 296 | | |
279 | | - | |
| 297 | + | |
280 | 298 | | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
284 | 302 | | |
285 | | - | |
| 303 | + | |
286 | 304 | | |
287 | 305 | | |
288 | 306 | | |
| |||
369 | 387 | | |
370 | 388 | | |
371 | 389 | | |
372 | | - | |
| 390 | + | |
373 | 391 | | |
374 | 392 | | |
375 | 393 | | |
| |||
0 commit comments