Skip to content

osd/SnapManager: Crimson - fix std::string constructed from 0#55910

Merged
Matan-B merged 1 commit intoceph:mainfrom
zhscn:fix-int-string
Mar 6, 2024
Merged

osd/SnapManager: Crimson - fix std::string constructed from 0#55910
Matan-B merged 1 commit intoceph:mainfrom
zhscn:fix-int-string

Conversation

@zhscn
Copy link
Member

@zhscn zhscn commented Mar 4, 2024

the output of clang 17:

/home/zhangsong02/nv/ceph/src/osd/SnapMapper.cc:150:59: error: attempt to use a deleted function
  150 |     *next_or_current = std::make_pair(key, std::move(vals[0]));
      |                                                           ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/basic_string.h:742:7: note: 'basic_string' has been explicitly marked deleted here
  742 |       basic_string(nullptr_t) = delete;
      |       ^
1 error generated.

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

Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
@zhscn zhscn requested a review from a team as a code owner March 4, 2024 03:20
@github-actions github-actions bot added the core label Mar 4, 2024
@zhscn
Copy link
Member Author

zhscn commented Mar 4, 2024

@rzarzynski please take a look at whether this change reasonable.

@Matan-B Matan-B added the crimson label Mar 4, 2024
@Matan-B Matan-B requested a review from a team March 4, 2024 08:18
@Matan-B Matan-B changed the title osd/SnapManager: fix std::string constructed from 0 osd/SnapManager: Crimson - fix std::string constructed from 0 Mar 4, 2024
ch, hoid, FuturizedStore::Shard::omap_keys_t{key}
).safe_then([&key, next_or_current] (FuturizedStore::Shard::omap_values_t&& vals) {
assert(vals.size() == 1);
*next_or_current = std::make_pair(key, std::move(vals[0]));
Copy link
Contributor

Choose a reason for hiding this comment

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

omap_values_t is:

    using omap_values_t = std::map<std::string, ceph::bufferlist, std::less<>>;

so we definitely want the begin()->second.
Good catch, thanks!

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

jenkins test make check

@tchaikov
Copy link
Contributor

tchaikov commented Mar 5, 2024

7 - run-tox-mgr-dashboard-py3 (Failed)

@Matan-B
Copy link
Contributor

Matan-B commented Mar 6, 2024

@Matan-B Matan-B merged commit f2af813 into ceph:main Mar 6, 2024
@zhscn zhscn deleted the fix-int-string branch March 6, 2024 09:26
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