Skip to content

test/osd: Add truncate-then-write tests - #69662

Merged
aainscow merged 2 commits into
ceph:mainfrom
aainscow:truncate_and_write_tests
Jul 28, 2026
Merged

aainscow merged 2 commits into
ceph:mainfrom
aainscow:truncate_and_write_tests

Conversation

@aainscow

@aainscow aainscow commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Add an extensive set of tests and unit tests to fully test the combined truncate and write transactions which are supported by the RADOS API.

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.

@aainscow
aainscow requested a review from a team as a code owner June 23, 2026 08:08
@aainscow
aainscow force-pushed the truncate_and_write_tests branch from 9dafd3d to a57a45f Compare June 23, 2026 08:13
@MattyWilliams22

Copy link
Copy Markdown
Contributor

jenkins test api

@MattyWilliams22

Copy link
Copy Markdown
Contributor

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@aainscow aainscow added the no-backport-required Label that can be optionally added to show that we do not need to backport. label Jun 30, 2026
@amathuria

Copy link
Copy Markdown
Contributor

@JonBailey1993 JonBailey1993 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.

A couple of comments on the common/io_exerciser and test/osd/ceph_test_rados_io_sequence portion of the PR, but they are just nits and I'd have no problem with it being merged as-is.

uint64_t length);
};

class DoubleTruncateWriteOp : public TruncateWriteOp<OpType::TruncateWrite2, 2> {

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.

Is double/triple purely added for use in the interactive mode, or was it intended to be used as part of a sequence? I only ask as I don't see them used as part of the automated tests.

@MattyWilliams22 MattyWilliams22 Jul 17, 2026 •

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.

I initially thought that it might be good to have the option to add multiple writes. And I was copying the existing WriteOp code which has a Double and Triple option.
But as these classes are never being used, and I doubt they will be needed in the future, it probably makes sense to get rid of them.

@JonBailey1993 JonBailey1993 Jul 17, 2026 •

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.

I'm not opposed to them staying around for interactive mode - more wanted to make sure there wasn't a DoubleTruncateWrite commit or something that hadn't yet been pushed or something, which sounds like there isn't, so that's fine.

Comment thread src/common/io_exerciser/ObjectModel.cc Resolved
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@MattyWilliams22
MattyWilliams22 force-pushed the truncate_and_write_tests branch 2 times, most recently from 76e170f to cfd075a Compare July 21, 2026 15:55
@MattyWilliams22
MattyWilliams22 force-pushed the truncate_and_write_tests branch 2 times, most recently from 940cffd to 2291564 Compare July 22, 2026 10:33
current io exerciser sequences can model standalone truncates and writes,
but cannot generate a single transaction that truncates an object and
then writes sparse regions. Add SingleTruncateWriteOp, DoubleTruncateWriteOp,
and TripleTruncateWriteOp, wire them through IoSequence, ObjectModel, and
RadosIo, and extend EC sequences/tests so truncate+write transactions can
be reproduced and validated.

Signed-off-by: Matty Williams <[email protected]>
Assisted-by: IBM Bob:Claude/GPT
@aainscow
aainscow force-pushed the truncate_and_write_tests branch from 2291564 to 0f5135a Compare July 24, 2026 10:50
@aainscow

Copy link
Copy Markdown
Contributor Author

The rebase had some merge conflicts which needed resolving, but these only affected the unit tests, which do not need a new QA run.

@bill-scales bill-scales 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.

Tests look ok, the changes to ceph_test_rados_io_sequence are a bit verbose and perhaps could be refactored a little to reduce repetition, but the new I/O sequence is good, as is the ability to issue truncate with 1,2, or 3 write ops in interactive mode.

The 2nd commit has a duplicate Signed-off-by message

Add unit-tests to recreate the problems found by the IO Sequencer in the previous commit.

Some tests here rely on frameworks added in Umbrella and as such we are keeping them
independent (in their own PRs).

Signed-off-by: Alex Ainscow <[email protected]>
Signed-off-by: Matty Williams <[email protected]>
Assisted-by: IBM Bob:Claude/GPT
@aainscow
aainscow force-pushed the truncate_and_write_tests branch from 0f5135a to c95853d Compare July 27, 2026 17:48
@aainscow

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@aainscow
aainscow merged commit 7eaf1fb into ceph:main Jul 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common core needs-qa no-backport-required Label that can be optionally added to show that we do not need to backport. tests wip-bharath10-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants