Skip to content

test: Improve efficiency of omap tests - #69303

Merged
MattyWilliams22 merged 1 commit into
ceph:mainfrom
MattyWilliams22:ec-omap-tests-improved
Aug 5, 2026
Merged

MattyWilliams22 merged 1 commit into
ceph:mainfrom
MattyWilliams22:ec-omap-tests-improved

Conversation

@MattyWilliams22

@MattyWilliams22 MattyWilliams22 commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Before, every test was creating and destroying a pool, adding a lot of overhead.

Now, a single pool of each type (Replicated + Fast EC) are used for all of the omap tests.

Also, introduced helper functions to reduce code duplication between tests.

This test fixture will also be used to run all the cls method tests in Replicated and Fast EC pools in this PR: 67448

Fixes: https://tracker.ceph.com/issues/77330

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.

@MattyWilliams22 MattyWilliams22 changed the title osd: Improve efficiency of omap tests test: Improve efficiency of omap tests Jun 5, 2026
@MattyWilliams22
MattyWilliams22 force-pushed the ec-omap-tests-improved branch from 2c2ecfd to f2d97a2 Compare June 5, 2026 15:26
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

@MattyWilliams22
MattyWilliams22 force-pushed the ec-omap-tests-improved branch 6 times, most recently from 6c0daa6 to 41c60d9 Compare June 11, 2026 09:33
@MattyWilliams22
MattyWilliams22 marked this pull request as ready for review June 11, 2026 09:33
@MattyWilliams22
MattyWilliams22 requested review from a team as code owners June 11, 2026 09:33
Comment thread doc/rados/operations/pools.rst Resolved
Comment thread doc/glossary.rst Resolved
@MattyWilliams22
MattyWilliams22 force-pushed the ec-omap-tests-improved branch 2 times, most recently from 66e7ba8 to 54c8d93 Compare June 12, 2026 12:38
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

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

I have only reviewed the last commit, but LGTM

Comment thread src/test/librados/omap_cxx.cc Resolved
Comment thread src/test/librados/test_pool_types.cc Resolved
@MattyWilliams22
MattyWilliams22 force-pushed the ec-omap-tests-improved branch from 54c8d93 to 57ee1a9 Compare July 10, 2026 15:50
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

Use a single pool of each type for all tests instead of creating a new pool for each test.

Fixes: https://tracker.ceph.com/issues/77330
Assisted-by: Bob
Signed-off-by: Matty Williams <[email protected]>
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath7-testing-20260724.101654-main.

@JonBailey1993

Copy link
Copy Markdown
Contributor

@MattyWilliams22
MattyWilliams22 merged commit 91b59d4 into ceph:main Aug 5, 2026
9 checks passed
@MattyWilliams22
MattyWilliams22 deleted the ec-omap-tests-improved branch August 5, 2026 12:42
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/31006827813

.time_since_epoch().count());
ioctx.set_namespace(nspace);

cleanup_namespace(rados, ioctx, nspace);

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.

What is the purpose of this cleanup_namespace() call? The names of both the pool and the namespace are supposed to be unique, can the namespace really be polluted at this point?

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.

I agree that this call is unnecessary as 'nspace' is unique

}

void PoolTypeTestFixture::TearDown() {
cleanup_namespace(rados, ioctx, "");

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 any of the tests that use PoolTypeTestFixture/ClsTestFixture pollute the default namespace in addition to the namespace that they are handed out by the fixture?

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.

As far as I know, no tests currently pollute the default namespace (as I wrote most of them).
However, it is possible that a test could be written in the future that does.
When I wrote this I was following the pattern used in testcase_cxx.cc which does the same.

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.

However, it is possible that a test could be written in the future that does.

Well, this argument can be extended to a custom namespace with an arbitrary name chosen by the test (e.g. ns1) as well. If the test pollutes some namespace, default or any other, previously it didn't matter because the pool would get re-created for the next test. Now it potentially matters (i.e. may present a problem if one of the next tests wants to operate on the same namespace), but the default namespace is the only one that gets treated specially. Nothing particularly wrong with that, it's just not obvious why.

When I wrote this I was following the pattern used in testcase_cxx.cc which does the same.

I see, thanks for the pointer.

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.

8 participants