rustic_core
rustic_core copied to clipboard
refactor: separate backend operations
This PR refactors indexer and packer into a version which is completely independent from I/O and concurrency but simply provides the functionality. This can then be separated into real "core" functionality.
As a side effect, this PR solves the following topics:
- Ensure that really no duplicate blobs are saved (closes #146)
- Solves potential race conditions (which in theory could lead to data loss) between finalizing packer/indexed and file_saver by using
selfin thefinalizemethods.
Codecov Report
:x: Patch coverage is 61.81102% with 97 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 44.0%. Comparing base (6d3577d) to head (9555d5b).
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| crates/core/src/archiver/file_archiver.rs | 63.1% <100.0%> (ø) |
|
| crates/core/src/archiver/tree_archiver.rs | 69.7% <100.0%> (ø) |
|
| crates/core/src/blob.rs | 72.7% <ø> (-7.3%) |
:arrow_down: |
| crates/core/src/chunker.rs | 50.5% <ø> (-1.2%) |
:arrow_down: |
| crates/core/src/archiver.rs | 58.9% <66.6%> (-0.8%) |
:arrow_down: |
| crates/core/src/backend/decrypt.rs | 48.1% <33.3%> (+0.2%) |
:arrow_up: |
| crates/core/src/commands/copy.rs | 0.0% <0.0%> (ø) |
|
| crates/core/src/commands/merge.rs | 0.0% <0.0%> (ø) |
|
| crates/core/src/commands/repair/snapshots.rs | 0.0% <0.0%> (ø) |
|
| crates/core/src/index/indexer.rs | 91.6% <89.2%> (+45.5%) |
:arrow_up: |
| ... and 5 more |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.