Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redundancy to storage #7

Open
8 tasks
dswd opened this issue Jun 15, 2017 · 0 comments
Open
8 tasks

Add redundancy to storage #7

dswd opened this issue Jun 15, 2017 · 0 comments

Comments

@dswd
Copy link
Owner

dswd commented Jun 15, 2017

If one or more bundles get lost, it is important to have some redundancy to reconstruct them.
Redundancy can be added by taking N bundles, calculating their parity (XORing all their contents including headers) and storing this parity together with the bundles.
If one of the bundles gets lost or corrupted, the parity can be used together with the remaining bundles to reconstruct the lost bundle.

Ok the plan is as follows:

  • Add a format for parity files containing
    • A magic header to identify the file type
    • A header containing the bundle ids and sizes of the contained bundles
    • The raw parity data
  • Add a configuration option that defines how many bundles are combined into a parity file
  • Add a parity writer that creates parity files while writing bundles.
  • Upload parity files to the same directory hierarchy as bundle files.
  • Extend the bundle map to also include parity file information.
    • Add new parity files automatically
    • Fetch missing parity information automatically
  • Try to repair broken bundles with the help of parity files.
  • Add information to info commands to display parity size
  • Modify/delete parity files on vacuum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant