zebra/zebrad/src
Alfredo Garcia 769d069d0a
feat(state): delete old database directories (#4586)
* delete old database directories

* check if state directory exists

* skip deleting when ephemeral

* split `check_and_delete_old_databases`

* move `check_and_delete_old_databases` to state

* spawn `check_and_delete_old_databases`

* simplity a bit

* fix(state): only delete old database directories inside the cache directory (#4631)

* Add function comments, tweak log

* Simplify version parsing

* Use spawn_blocking to launch the task on a separate thread, do the cleanup last

* Abort the cleanup task when Zebra exits

* Split directory deletion into its own function, handle ownership

* Rename cache_dir to state_dir

* If an outdated state directory is outside the cache directory, don't delete it

* Minimise diffs

* add test

* fix typos

Co-authored-by: teor <teor@riseup.net>

* add `canonicalize` to test regex

* add another match to test

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-21 00:59:51 +00:00
..
bin/zebrad Consolidate standard lints into a cargo config file (#3386) 2022-01-24 16:25:06 +00:00
commands feat(state): delete old database directories (#4586) 2022-06-21 00:59:51 +00:00
components breaking(diagnostics): make zebrad diagnostics into optional compile-time features (#4539) 2022-06-16 19:56:40 +00:00
application.rs breaking(diagnostics): make zebrad diagnostics into optional compile-time features (#4539) 2022-06-16 19:56:40 +00:00
commands.rs feat(util): add a `zebra-tip-height` utility (#4289) 2022-05-06 03:31:52 +00:00
components.rs Re-order Zebra startup, so slow services are launched last (#3091) 2021-11-23 17:42:44 +00:00
config.rs feature(rpc): add an rpc server to Zebra (#3589) 2022-02-22 08:26:29 -03:00
lib.rs breaking(diagnostics): make zebrad diagnostics into optional compile-time features (#4539) 2022-06-16 19:56:40 +00:00
prelude.rs Fix a deadlock in TokioComponent. 2020-01-15 12:06:31 -08:00
sentry.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00