-
Notifications
You must be signed in to change notification settings - Fork 0
Option 1.5 implementation #21
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
base: development/1.0
Are you sure you want to change the base?
Conversation
- Improves last stripe efficiency. - Adds new BufferMatrix format. - Fixes edge cases in last stripe. - Keeps compatibility with old format.
This commit adds tests and fixes to allow reading data ranges correctly from both old and new formats of erasure-coded data. It ensures correct fragment selection and decoding for range reads in both formats.
- Annotate origDataSize check with //nolint:gosec after review - Rename `backendId` to `backendID` for Go conventions
Hello benoit-a,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
ConflictThere is a conflict between your branch Please resolve the conflict on the feature branch ( git fetch && \
git checkout origin/bugfix/study_1 && \
git merge origin/development/1.0Resolve merge conflicts and commit git push origin HEAD:bugfix/study_1 |
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.
Pull Request Overview
This pull request implements Option 1.5 by enhancing the encoding/decoding functionality, introducing a new buffer matrix format, and adding comprehensive tests to validate these changes. Key updates include:
- New tests and methods to support the new buffer matrix format.
- Improvements to offset calculation and fragment length handling in buffer.go.
- Adjustments in encoding routines and range matrix tests to support both old and new formats.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| buffer_test.go | Added new test functions (TestBufferNew, TestGetOffsetNew, etc.) for validating new format |
| buffer.go | Modified BufferMatrix to support a new format alongside improved offset and header management |
| backend_test.go | Introduced tests to check compatibility between old and new formats and range matrix correctness |
| backend.go | Updated encoding routines (chunk preparation, fragment handling) to work with new buffer format |
| // do the true encoding according the backend used (isa-l, cauchy ....) | ||
| ret = ec->common.ops->encode(ec->desc.backend_desc, k_ref, m_ref, ctx->chunk_size); | ||
| // chunksize is the size of fragmenets in the stripe |
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.
| // chunksize is the size of fragmenets in the stripe | |
| // chunksize is the size of fragments in the stripe |
| // If we are at the end of the data, we may have a smaller | ||
| // fragment than the others. fraglen will take of that. | ||
| int size = datalen - ((nth * ctx->k * ctx->chunk_size) + (i * fraglen)); | ||
| tot_len_sum += size > 0 ? (size > fraglen ? fraglen : size) : 0; |
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.
is there some cases where fraglent can be lower than 0 ?
otherwise, it could be simplified ?
This pull request includes several changes to the
backend.gofile and related test files to improve encoding and decoding functionality, add new tests, and introduce a new format for buffer matrices. The most important changes include the addition of a new format for buffer matrices, improvements to the encoding and decoding processes, and the addition of new tests to ensure compatibility and correctness.