Skip to content

osdc: Add minimum allowable split size for replica IOs - #69290

Merged
SrinivasaBharath merged 2 commits into
ceph:mainfrom
JonBailey1993:ec_direct_reads_prepare_single_op_fix
Sep 18, 2026
Merged

SrinivasaBharath merged 2 commits into
ceph:mainfrom
JonBailey1993:ec_direct_reads_prepare_single_op_fix

Conversation

@JonBailey1993

@JonBailey1993 JonBailey1993 commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Previously there was no minimum allowable split size for replica IOs. This ran into issues with the prepare_single_op path which was only intended for EC ops. This adds a minimum to prevent issues occurring in this area and prevents replica IOs going down this path. This fixes code introduced in EC Direct Reads (d628f85).

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@JonBailey1993
JonBailey1993 requested a review from aainscow June 4, 2026 14:56
@JonBailey1993
JonBailey1993 force-pushed the ec_direct_reads_prepare_single_op_fix branch 2 times, most recently from 563ec1f to 3fd3b18 Compare June 5, 2026 11:16
@github-actions

github-actions Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

! changed: osd_min_split_replica_read_size: old:  (global.yaml.in)
! changed: osd_min_split_replica_read_size: new: [](std::string *value, std::string *error_message) {
  uint64_t f = strict_si_cast<uint64_t>(*value, error_message);
  if (!error_message->empty()) {
    return -EINVAL;
  } else if (f < SplitOp::REPLICA_MIN_SPLIT_SIZE && f != 0) {
    *error_message = "value must be 4096 or greater"
                     " or set to zero to disable splitting";
    return -EINVAL;
  }
  return 0;
}
 (global.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@JonBailey1993 JonBailey1993 changed the title osdc: Add replica path for prepare_single_op osdc: Add minimum allowable split size for replica IOs Jun 8, 2026
@JonBailey1993
JonBailey1993 force-pushed the ec_direct_reads_prepare_single_op_fix branch 3 times, most recently from 7182435 to f2276bb Compare June 8, 2026 11:41

@aainscow aainscow left a comment

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.

LGTM

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@JonBailey1993
JonBailey1993 force-pushed the ec_direct_reads_prepare_single_op_fix branch from f2276bb to a5c8295 Compare July 9, 2026 13:21
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@yuriw

yuriw commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri3-testing-20260808.022747-main.

@ljflores

ljflores commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Hey @JonBailey1993 , I found this issue that looks related in the teuthology tests:

Testing ref: https://tracker.ceph.com/issues/79167

/a/yuriw-2026-08-08_14:04:25-rados-wip-yuri3-testing-20260808.022747-main-distro-default-trial/446688

2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.BigRead/1
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: ./src/test/librados/split_op_cxx.cc:71: Failure
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Value of: AssertOperateWithSplitOp(0, 3, "foo", &read, &bl, balanced_read_flags)
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:   Actual: false (Perf counter 'objecter.split_op_reads' has incorrect value after operate().
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:        Expected: 3         Actual: 0)
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Expected: true
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [  FAILED  ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.BigRead/1, where GetParam() = true (16 ms)
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.ReadTwoShards/0
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [       OK ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.ReadTwoShards/0 (9 ms)
2026-08-09T12:25:34.688 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.ReadTwoShards/1
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: ./src/test/librados/split_op_cxx.cc:123: Failure
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Value of: AssertOperateWithSplitOp(0, 2, "foo", &read, &read_bl, balanced_read_flags)
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:   Actual: false (Perf counter 'objecter.split_op_reads' has incorrect value after operate().
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:        Expected: 2         Actual: 0)
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Expected: true
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [  FAILED  ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.ReadTwoShards/1, where GetParam() = true (9 ms)
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.StatBeforeRead/0
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [       OK ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.StatBeforeRead/0 (4 ms)
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.StatBeforeRead/1
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: ./src/test/librados/split_op_cxx.cc:192: Failure 
2026-08-09T12:25:34.689 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Value of: AssertOperateWithSplitOp(0, 2, "foo", &read, &result_bl, balanced_read_flags)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:   Actual: false (Perf counter 'objecter.split_op_reads' has incorrect value after operate().
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:        Expected: 2         Actual: 0)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Expected: true
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [  FAILED  ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.StatBeforeRead/1, where GetParam() = true (4 ms)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.GetXattrBeforeRead/0
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [       OK ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.GetXattrBeforeRead/0 (7 ms)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [ RUN      ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.GetXattrBeforeRead/1
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: ./src/test/librados/split_op_cxx.cc:243: Failure
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Value of: AssertOperateWithSplitOp(0, 2, "foo", &read, &result_bl, balanced_read_flags)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:   Actual: false (Perf counter 'objecter.split_op_reads' has incorrect value after operate().
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:        Expected: 2         Actual: 0)
2026-08-09T12:25:34.690 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: Expected: true
2026-08-09T12:25:34.691 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp:
2026-08-09T12:25:34.691 INFO:tasks.workunit.client.0.trial060.stdout:          api_split_op_pp: [  FAILED  ] LibRadosSplitOpPPParamCombination/LibRadosSplitOpPP.GetXattrBeforeRead/1, where GetParam() = true (5 ms)

@ljflores

Copy link
Copy Markdown
Member

Removed "needs-qa" for now. Reapply it when this is ready for testing again

When creating new EC pools, we no longer use 4k statically as the default value
if nothing is set. Instead, in OSDMonitor::prepare_pool_stripe_width we choose
eith 4K or 16K based on whether we support optimisations and have optimisations
enabled on the pool. Because of this, when running split_op_cxx tests without
osd_pool_erasure_code_stripe_unit set, you would see some failures where the
test was trying to send an IO that should be split, but was not split due to the
16K chunk size.

This fixes the issue by determining the stripe unit of the pool before deciding
on the size of the IO so we can always send two chunks worth of data, and should
protect the tests if the default chunk size is increased again in the future as
well.

Signed-off-by: Jon Bailey <[email protected]>
Assisted-by: IBM Bob 2.0.4
@JonBailey1993
JonBailey1993 force-pushed the ec_direct_reads_prepare_single_op_fix branch from a5c8295 to 35bc8c8 Compare August 24, 2026 12:50
@JonBailey1993

Copy link
Copy Markdown
Contributor Author

Thanks @ljflores , it looks like there was a couple of issues that caused the teuthology issues. One in this PR which I fixed, and a test issue which I raised a PR for here: #71285

I'll hold off on adding the needs-qa tag onto this PR until #71285 is ready for the tag, as this one depends on it, so they should probably either be tested together, or this one should be tested after that one has merged.

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

/config check ok

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@JonBailey1993

Copy link
Copy Markdown
Contributor Author

I've added the needs-qa label to this and #71285 - it would be good if they could go through QA together as this PR depends on #71285

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath12-testing-20260911.231931-main.

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@SrinivasaBharath
SrinivasaBharath merged commit 7248fe4 into ceph:main Sep 18, 2026
8 of 9 checks passed
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.

7 participants