Skip to content

crimson/osd/pg: reset the snap mapper's backend when pg interval changes - #57125

Merged
Matan-B merged 1 commit into
ceph:mainfrom
xxhdx1985126:wip-65679
Jun 26, 2024
Merged

Matan-B merged 1 commit into
ceph:mainfrom
xxhdx1985126:wip-65679

Conversation

@xxhdx1985126

Copy link
Copy Markdown
Member

Fixes: https://tracker.ceph.com/issues/65679
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

@Matan-B

Matan-B commented Apr 30, 2024

Copy link
Copy Markdown
Contributor
DEBUG active+clean+snaptrim  ObjectContextLoader::get_or_load_obc: cache hit on 3:6bb7f7ea:::scephqa03.cpp.bjat.qianxin-inc.cn204052-10:head
/src/crimson/osd/object_context_loader.cc:108:  Assertion `cit != std::end(ss.clones)' failed.

Can you please explain how this assert relates to the stale cache?

@athanatos athanatos 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 other than removing the ifdef's

Comment thread src/common/map_cacher.hpp 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 behavior is not specific to seastar, remove the ifdef.

Comment thread src/common/sharedptr_registry.hpp 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 behavior is not specific to seastar, remove the ifdef.

Comment thread src/osd/SnapMapper.h 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 behavior is not specific to seastar, remove the ifdef.

@xxhdx1985126

xxhdx1985126 commented May 8, 2024 •

Copy link
Copy Markdown
Member Author
DEBUG active+clean+snaptrim  ObjectContextLoader::get_or_load_obc: cache hit on 3:6bb7f7ea:::scephqa03.cpp.bjat.qianxin-inc.cn204052-10:head
/src/crimson/osd/object_context_loader.cc:108:  Assertion `cit != std::end(ss.clones)' failed.

Can you please explain how this assert relates to the stale cache?

This is a little bit tricky.

  1. Snaps snap1 and snap2 on object obj1 maps to the same clone c
  2. Snap snap1 is being trimmed on PG P;
  3. Before snap1 of obj1 is trimmed and after the obj1 <-> snap1 mapping is removed from the snap mapper, P's interval changed;
  4. Snap snap2 is trimmed on obj1 and caused the c to be removed
  5. The osd gets restarted and find that snap1 of obj1 hasn't been trimmed
  6. The osd tries to trim snap1 on obj1 and meet the assertion cit != std::end(ss.clones)

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

This is a little bit tricky.

  1. Snaps snap1 and snap2 on object obj1 maps to the same clone c
  2. Snap snap1 is being trimmed on PG P;
  3. Before snap1 of obj1 is trimmed and after the obj1 <-> snap1 mapping is removed from the snap mapper, P's interval changed;
  4. Snap snap2 is trimmed on obj1 and caused the c to be removed
  5. The osd gets restarted and find that snap1 of obj1 hasn't been trimmed
  6. The osd tries to trim snap1 on obj1 and meet the assertion cit != std::end(ss.clones)

Ah, thanks! LGTM besides comments left by @athanatos

@xxhdx1985126

Copy link
Copy Markdown
Member Author

All done:-)

@Matan-B

Matan-B commented May 19, 2024

Copy link
Copy Markdown
Contributor

@Matan-B

Matan-B commented Jun 9, 2024

Copy link
Copy Markdown
Contributor

@Matan-B

Matan-B commented Jun 9, 2024

Copy link
Copy Markdown
Contributor

jenkins test windows

@Matan-B

Matan-B commented Jun 9, 2024

Copy link
Copy Markdown
Contributor

jenkins test windows

@github-actions

github-actions Bot commented Jun 9, 2024

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@xxhdx1985126

Copy link
Copy Markdown
Member Author

Rebased.

@Matan-B

Matan-B commented Jun 18, 2024

Copy link
Copy Markdown
Contributor

rebased on latest main

@Matan-B

Matan-B commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

windows test is not playing along

@Matan-B

Matan-B commented Jun 23, 2024

Copy link
Copy Markdown
Contributor

jenkins test windows

@Matan-B

Matan-B commented Jun 24, 2024

Copy link
Copy Markdown
Contributor
src/test/common/CMakeFiles/unittest_sharedptr_registry.dir/test_sharedptr_registry.cc.obj -c /home/ubuntu/ceph/src/test/common/test_sharedptr_registry.cc
In file included from /home/ubuntu/ceph/src/test/common/test_sharedptr_registry.cc:26:
/home/ubuntu/ceph/src/common/sharedptr_registry.hpp:65:5: error: use of undeclared identifier 'ceph_assert'
    ceph_assert(!waiting);
    ^
1 error generated.

@Matan-B

Matan-B commented Jun 24, 2024

Copy link
Copy Markdown
Contributor

jenkins test make check

@Matan-B

Matan-B commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

@rzarzynski, common change here though Crimson is the only user meaning no actual impact to classic. Can this one be merged?

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.

4 participants