Commit fabd0f3
authored
fix: cleanup slots on non-fresh ledger (#404)
On start of `LedgerTruncator` we initialize lowest_cleaup_slot
<!-- greptile_comment -->
## Greptile Summary
Added initialization of lowest_cleanup_slot in LedgerTruncator to
prevent unintended truncation when starting with non-fresh ledgers.
- Added new method `initialize_lowest_cleanup_slot` in
`magicblock-ledger/src/store/api.rs` to scan blockhash CF for lowest
available slot
- Modified LedgerTruncator startup in
`magicblock-ledger/src/ledger_truncator.rs` to properly initialize
lowest cleanup slot
- Default lowest cleanup slot to 0 if no slots are found in blockhash
column family
<!-- /greptile_comment -->1 parent dfd627c commit fabd0f3
File tree
3 files changed
+52
-29
lines changed- magicblock-ledger/src
- store
- test-integration
3 files changed
+52
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
243 | 263 | | |
244 | 264 | | |
245 | 265 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments