Skip to content

os/seastore: fix FTBFS due to passing const d_node to _omap_set_kvs() - #55844

Closed
rzarzynski wants to merge 1 commit into
ceph:mainfrom
rzarzynski:wip-fix-_omap_set_kvs
Closed

rzarzynski wants to merge 1 commit into
ceph:mainfrom
rzarzynski:wip-fix-_omap_set_kvs

Conversation

@rzarzynski

Copy link
Copy Markdown
Contributor
[ 96%] Building CXX object src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/seastore.cc.o
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc: In lambda function:
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc:1618:11: error: cannot convert ‘const OnodeRef’ {aka ‘const boost::intrusive_ptr<crimson::os::seastore::Onode>’} to ‘crimson::os::seastore::OnodeRef&’ {aka ‘boost::intrusive_ptr<crimson::os::seastore::Onode>&’}
 1618 |           d_onode,
      |           ^~~~~~~
      |           |
      |           const OnodeRef {aka const boost::intrusive_ptr<crimson::os::seastore::Onode>}
In file included from /home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc:4:
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.h:429:17: note:   initializing argument 1 of ‘crimson::os::seastore::SeaStore::Shard::omap_set_kvs_ret crimson::os::seastore::SeaStore::Shard::_omap_set_kvs(crimson::os::seastore::OnodeRef&, const crimson::os::seastore::omap_root_le_t&, crimson::os::seastore::Transaction&, std::map<std::__cxx11::basic_string<char>, ceph::buffer::v15_2_0::list>&&)’
  429 |       OnodeRef &onode,
      |       ~~~~~~~~~~^~~~~
make[2]: *** [src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/build.make:622: src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/seastore.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

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

@ljflores ljflores left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

build/build/workspace/ceph-pull-requests/src/crimson/os/seastore/seastore.cc
/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/os/seastore/seastore.cc:1594:65: error: lambda without a parameter clause is a C++2b extension [-Werror,-Wc++2b-extensions]
  return trans_intr::repeat([&ctx, onode, d_onode, this, otype] mutable {
                                                                ^
                                                                () 
1 error generated.

```
[ 96%] Building CXX object src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/seastore.cc.o
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc: In lambda function:
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc:1618:11: error: cannot convert ‘const OnodeRef’ {aka ‘const boost::intrusive_ptr<crimson::os::seastore::Onode>’} to ‘crimson::os::seastore::OnodeRef&’ {aka ‘boost::intrusive_ptr<crimson::os::seastore::Onode>&’}
 1618 |           d_onode,
      |           ^~~~~~~
      |           |
      |           const OnodeRef {aka const boost::intrusive_ptr<crimson::os::seastore::Onode>}
In file included from /home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.cc:4:
/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/19.0.0-1777-ga04996aa/rpm/el8/BUILD/ceph-19.0.0-1777-ga04996aa/src/crimson/os/seastore/seastore.h:429:17: note:   initializing argument 1 of ‘crimson::os::seastore::SeaStore::Shard::omap_set_kvs_ret crimson::os::seastore::SeaStore::Shard::_omap_set_kvs(crimson::os::seastore::OnodeRef&, const crimson::os::seastore::omap_root_le_t&, crimson::os::seastore::Transaction&, std::map<std::__cxx11::basic_string<char>, ceph::buffer::v15_2_0::list>&&)’
  429 |       OnodeRef &onode,
      |       ~~~~~~~~~~^~~~~
make[2]: *** [src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/build.make:622: src/crimson/os/seastore/CMakeFiles/crimson-seastore.dir/seastore.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
```

Signed-off-by: Radoslaw Zarzynski <[email protected]>
@rzarzynski
rzarzynski force-pushed the wip-fix-_omap_set_kvs branch from 2d195fd to 27a73ca Compare February 29, 2024 19:47
const omap_type_t otype)
{
return trans_intr::repeat([&ctx, onode, d_onode, this, otype] {
return trans_intr::repeat([&ctx, onode, d_onode, this, otype]() mutable {

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.

Oops, added (). Thanks @ljflores for pointing this out!

@cyx1231st

Copy link
Copy Markdown
Member

Seems there is an unrelated FTBFS issue, not sure how they passed jenkens initially.

/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/seastar/gen/src/proto/metrics2.pb.h:2838:16: error: call to member function 'Set' is ambiguous
  _impl_.name_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  ~~~~~~~~~~~~~^~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/seastar/src/core/prometheus.cc:81:16: note: in instantiation of function template specialization 'io::prometheus::client::LabelPair::set_name<const seastar::basic_sstring<char, unsigned int, 15, true>>' requested here
        label->set_name(ctx.label->key());
               ^
/usr/include/google/protobuf/arenastring.h:295:8: note: candidate function
  void Set(absl::string_view value, Arena* arena);
       ^
/usr/include/google/protobuf/arenastring.h:296:8: note: candidate function
  void Set(std::string&& value, Arena* arena);
       ^

return seastar::do_with(
std::optional<std::string>(std::nullopt),
[&ctx, onode, d_onode, this, otype](auto &start) {
[&ctx, onode, d_onode, this, otype](auto &start) mutable {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably it's better to adjust the type of the param rather than adding mutable here? @xxhdx1985126

Still approving to fix the issue first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, please take a look: #55855

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also approved.

@cyx1231st

Copy link
Copy Markdown
Member

jenkins test make check

@cyx1231st

Copy link
Copy Markdown
Member

@rzarzynski @ljflores I merged #55855

@rzarzynski

Copy link
Copy Markdown
Contributor Author

Closing in favor of #55855.

@rzarzynski rzarzynski closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants