Skip to content

crimson/osd/pg: implement PG::PGLogEntryHandler::remove() - #59227

Merged
Matan-B merged 3 commits into
ceph:mainfrom
xxhdx1985126:wip-67564
Aug 26, 2024
Merged

Matan-B merged 3 commits into
ceph:mainfrom
xxhdx1985126:wip-67564

Conversation

@xxhdx1985126

Copy link
Copy Markdown
Member

Fixes: https://tracker.ceph.com/issues/67564
Signed-off-by: Xuehan Xu [email protected]

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

Comment thread src/crimson/osd/pg_backend.cc Outdated

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.

This method may have other future users which are not pglog rollback, can you move this to
PGLogEntryHandler::remove?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, will do.

Comment thread src/crimson/osd/pg.cc Outdated
Comment on lines 1775 to 1776

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 sure that we actually need backend here:

t->remove(coll_ref->get_cid(), ghobject_t{hoid, ghobject_t::NO_GEN, pg_whoami.shard});

Comment thread src/crimson/osd/pg.cc Outdated
Comment on lines 1777 to 1792

@Matan-B Matan-B Aug 15, 2024 •

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.

Can we please move this into PG::clear_object_snap_mapping?
I think that we might also miss clear_object_snap_mapping / remove_snap_mapped_object since IIUC, PGLogEntryHandler::remove should only be responsible for removing.

Will calling snap_mapper.remove_oid allow us to avoid implementing the two functions mentioned above?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we need remove_snap_mapped_object. clear_object_snap_mapping is always used with ceph::os::Transaction::remove, which can be replace by remove_snap_mapped_object. What do you think?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

All coments addressed, please take a look again:-)

@xxhdx1985126

Copy link
Copy Markdown
Member Author

jenkins test make check

@xxhdx1985126

Copy link
Copy Markdown
Member Author

jenkins test api

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

lgtm, make check fails:

/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/recovery_backend.cc:210:40: error: 'soid' in capture list does not name a variable
    co_await interruptor::async([this, soid, &t] {
                                       ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/recovery_backend.cc:211:44: error: reference to local binding 'soid' declared in enclosing function 'RecoveryBackend::handle_backfill_remove'
      pg.remove_object_maybe_snapmapped(t, soid);
                                           ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/recovery_backend.cc:208:38: note: 'soid' declared here
  for ([[maybe_unused]] const auto& [soid, ver] : m.ls) {
                                     ^
2 errors generated.

Comment thread src/crimson/osd/pg.cc Resolved
@Matan-B

Matan-B commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

jenkins test api

@Matan-B
Matan-B merged commit 39beec9 into ceph:main Aug 26, 2024
pritha-srivastava pushed a commit to pritha-srivastava/ceph that referenced this pull request Aug 28, 2024
crimson/osd/pg: implement PG::PGLogEntryHandler::remove()

Reviewed-by: Matan Breizman <[email protected]>
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.

2 participants