Skip to content

erasure-code: Update EC plugin interface to show support for various optimisations - #61754

Closed
JonBailey1993 wants to merge 10 commits into
ceph:mainfrom
JonBailey1993:JonBailey1993/ECPluginInterface
Closed

JonBailey1993 wants to merge 10 commits into
ceph:mainfrom
JonBailey1993:JonBailey1993/ECPluginInterface

Conversation

@JonBailey1993

Copy link
Copy Markdown
Contributor

This PR updates the erasure code plugin interface so that plugins can support (and report whether they support) various optimisations along with tests verifying these supported values.

Pushing on behalf and with permission of @jamiepryde

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

Add flags to erasure code plugins to report supported optimizations
and new unittest_erasure_code_plugins to test these flags for many
permutations of plugins and profiles.

Signed-off-by: Bill Scales <[email protected]>

[Taken from Bill's fork with permission]
Signed-off-by: Jamie Pryde <[email protected]>
This commit adds FLAG_EC_PLUGIN_PARITY_DELTA_OPTIMIZATION to the list of
optimizations supported by the ISA plugin, and encode_delta and
apply_delta functions to ISA. Stubs for these functions are added to
the other plugins.
Two new tests have been added to TestErasureCodePlugins.cc to test the
encode_delta and apply_delta functions. The first new test updates a
single parity chunk using a single delta. The second new test updates
all parity chunks with a delta for every data chunk.

Signed-off-by: Jamie Pryde <[email protected]>
This commit adds FLAG_EC_PLUGIN_PARITY_DELTA_OPTIMIZATION to the list of
optimizations supported by the Jerasure plugin, and encode_delta and
apply_delta functions for all Jerasure techniques.

Signed-off-by: Jamie Pryde <[email protected]>
This commit adds FLAG_EC_PLUGIN_PARITY_DELTA_OPTIMIZATION to the list of
optimizations supported by the SHEC plugin, and encode_delta and
apply_delta functions.

Signed-off-by: Jamie Pryde <[email protected]>
Add get_minimum_granularity() function to the EC plugin interface,
which returns the minimum size in bytes that can be used for partial writes.
This is based on the minimum size of coding chunk update
that the particular technique supports.

Signed-off-by: Jamie Pryde <[email protected]>
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

Ceph-api test failed asserting http response code was 200 when 404 was received
2025-02-11 20:56:34,122.122 INFO:__main__:====================================================================== 2025-02-11 20:56:34,122.122 INFO:__main__:FAIL: test_all (tasks.mgr.dashboard.test_rgw.RgwBucketTest) 2025-02-11 20:56:34,122.122 INFO:__main__:---------------------------------------------------------------------- 2025-02-11 20:56:34,122.122 INFO:__main__:Traceback (most recent call last): 2025-02-11 20:56:34,122.122 INFO:__main__: File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/test_rgw.py", line 239, in test_all 2025-02-11 20:56:34,122.122 INFO:__main__: self.assertStatus(200) 2025-02-11 20:56:34,123.123 INFO:__main__: File "/home/jenkins-build/build/workspace/ceph-api/qa/tasks/mgr/dashboard/helper.py", line 496, in assertStatus 2025-02-11 20:56:34,123.123 INFO:__main__: self.assertEqual(self._resp.status_code, status) 2025-02-11 20:56:34,123.123 INFO:__main__:AssertionError: 404 != 200

Rerunning locally I do not observe this behaviour when running as below:
./run-backend-api-tests.sh tasks.mgr.dashboard.test_rgw.RgwBucketTest ./run-backend-api-tests.sh tasks.mgr.dashboard.test_rgw

tasks.mgr.dashboard.test_rgw.RgwBucketTest appears to pass fine, so this may be down to temporary network issues at the time. No changes were made to dashboard or RGW in this PR, so will retrigger the test to confirm.

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test api

@JonBailey1993
JonBailey1993 force-pushed the JonBailey1993/ECPluginInterface branch from 8da76d7 to c662482 Compare February 12, 2025 11:55
Comment thread src/erasure-code/isa/ErasureCodeIsa.cc Resolved
Comment thread src/erasure-code/isa/ErasureCodeIsa.h Resolved
… are supplied in erasure code profiles

Signed-off-by: Jon Bailey <[email protected]>
Comment thread src/erasure-code/ErasureCodeInterface.h Resolved
Comment thread src/erasure-code/ErasureCodeInterface.h Resolved
Now takes a plugin_types argument instead of a uint64_t. Modified so that if all flags are found, the string creation loop will exit early.

Signed-off-by: Jon Bailey <[email protected]>
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test api

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

* @param [in] new_data second buffer to xor
* @param [out] delta buffer to write the delta of old_data and new_data
*/
virtual void encode_delta(const bufferptr &old_data,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to use an 'out' param here (and below)?
Is it expected to contain any data beforehand (i.e. - is it an in-out param)?
If not - can it be created by the function and returned as its retval?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question has been raised here: #61804 (comment) (albeit unanswered yet), but after discussions with Jamie and Alex it appears this parameter will need to be an in-out param in certain cases.
Review for these changes are going to move to the linked PR as me and Alex appear to have crossed over each other here, so selecting the other PR as the primary PR - my apologies for the confusion.

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

Closing this PR in favour of #61804, which has been updated with the review comments from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants