mirror of
https://github.com/minio/minio.git
synced 2026-11-12 14:41:20 +00:00
Make erasure matrix type not optional choose automatically
Remove option of providing Technique and handling errors based on that choose a matrix type automatically based on number of data blocks. INTEL recommends on using cauchy for consistent invertible matrices, while vandermonde is faster we should default to cauchy for large data blocks.
This commit is contained in:
1 parent
cf0e1a156b
commit
d5ce2f6944
13 files changed
+67
-175
No files matched your search
+3
-4
@@ -39,10 +39,9 @@
|
||||
//
|
||||
// But here are the few points to keep in mind
|
||||
//
|
||||
// Techniques:
|
||||
// Matrix Type:
|
||||
// - Vandermonde is most commonly used method for choosing coefficients in erasure
|
||||
// encoding but does not guarantee invertable for every sub matrix.
|
||||
// Users may want to adjust for k > 5. (k is data blocks)
|
||||
// - Whereas Cauchy is our recommended method for choosing coefficients in erasure coding.
|
||||
// Since any sub-matrix of a Cauchy matrix is invertable.
|
||||
//
|
||||
@@ -53,14 +52,14 @@
|
||||
//
|
||||
// Creating and using an encoder
|
||||
// var bytes []byte
|
||||
// params := erasure.ValidateParams(10, 5, erasure.Cauchy)
|
||||
// params := erasure.ValidateParams(10, 5)
|
||||
// encoder := erasure.NewErasure(params)
|
||||
// encodedData, length := encoder.Encode(bytes)
|
||||
//
|
||||
// Creating and using a decoder
|
||||
// var encodedData [][]byte
|
||||
// var length int
|
||||
// params := erasure.ValidateParams(10, 5, erasure.Cauchy)
|
||||
// params := erasure.ValidateParams(10, 5)
|
||||
// encoder := erasure.NewErasure(params)
|
||||
// originalData, err := encoder.Decode(encodedData, length)
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user