Skip to content

test/lazy-omap-stats: overload get_output() to accept both lvalue and…#66277

Merged
rzarzynski merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-lazyomap-wait-active-clean-test
Dec 15, 2025
Merged

test/lazy-omap-stats: overload get_output() to accept both lvalue and…#66277
rzarzynski merged 1 commit intoceph:mainfrom
NitzanMordhai:wip-nitzan-lazyomap-wait-active-clean-test

Conversation

@NitzanMordhai
Copy link
Contributor

@NitzanMordhai NitzanMordhai commented Nov 17, 2025

… rvalue refs

PR #65014 added std::move() inside the while loop, which required recreating the command string on each iteration.

Add const std::string& overload that forwards to the existing std::string&& version, allowing the command to be declared outside the loop for better efficiency.

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

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.

@NitzanMordhai NitzanMordhai requested a review from badone November 17, 2025 10:42
@github-actions github-actions bot added the tests label Nov 17, 2025
@NitzanMordhai NitzanMordhai requested review from a team and rzarzynski November 17, 2025 17:26
int num_not_clean;
do {
string dump_output = get_output(std::move(command), true);
do {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: new extra spacing.

const std::string& command,
const bool silent = false,
const CommandTarget target = CommandTarget::TARGET_MGR) {
return get_output(std::string(command), silent, target); // delegate to rvalue version
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, even if if hadn't sharing optimizations in std::string, nobody would have cared in this case.

… rvalue refs

PR ceph#65014 added std::move() inside the while loop, which required
recreating the command string on each iteration.

Add const std::string& overload that forwards to the existing
std::string&& version, allowing the command to be declared outside
the loop for better efficiency.

Fixes: https://tracker.ceph.com/issues/73838
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-lazyomap-wait-active-clean-test branch from 0be747b to 3e107ec Compare November 18, 2025 13:25
@Naveenaidu
Copy link
Contributor

RADOS Approved: https://tracker.ceph.com/issues/73968#note-3

@rzarzynski rzarzynski merged commit 74227f6 into ceph:main Dec 15, 2025
21 of 25 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.

5 participants