-
Notifications
You must be signed in to change notification settings - Fork 340
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
Implement Erasure Coding #606
Conversation
This pull request has been mentioned on Duplicacy Forum. There might be relevant details there: https://forum.duplicacy.com/t/new-feature-erasure-coding/4168/1 |
@@ -1403,6 +1421,11 @@ func main() { | |||
Usage: "the RSA public key to encrypt file chunks", | |||
Argument: "<public key>", | |||
}, | |||
cli.StringFlag{ | |||
Name: "erasure-coding", | |||
Usage: "enable erasure coding to protect against storage corruption", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About naming:
From https://forum.duplicacy.com/t/new-feature-erasure-coding/4168/2?u=thebestpessimist i understand that this only protects the same chunk from corruption, and not the whole storage (ie. like raid5/6 does).
I think the Usage should be reworded to something like enable erasure coding to protect against intra-chunk corruption
, as this is not "storage level protection", just "chunk-level protection".
What would happen if in the future you would also add something like storage-level protection via something similar to raid5/6, which would do parity for any chunk?
|
||
// RSA encrypted chunks start with "duplicacy\002" | ||
var ENCRYPTION_VERSION_RSA byte = 2 | ||
|
||
var ERASURE_CODING_BANNER = "duplicacy\003" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be missunderstanding stuff but
RSA encrypted chunks start with "duplicacy\002"
ERASURE_CODING_BANNER = "duplicacy\003"
does this mean that we cannot have rsa and erasure at the same time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can have all of those, then the flag ENCRYPTION_BANNER
could be better renamed to FEATURE_LEVEL
.
A new option
-erasure-coding
is added to theinit
andadd
commands to provide the ability to recover from corrupted chunks.Example use:
When restoring from a storage with erasure coding enabled, the following log messages show corrupted chunks are being repaired: