Skip to content

crimson/osd: Introduce ObjectContextLoader#48682

Merged
Matan-B merged 5 commits intoceph:mainfrom
Matan-B:wip-matanb-obc-loader
Nov 29, 2022
Merged

crimson/osd: Introduce ObjectContextLoader#48682
Matan-B merged 5 commits intoceph:mainfrom
Matan-B:wip-matanb-obc-loader

Conversation

@Matan-B
Copy link
Contributor

@Matan-B Matan-B commented Oct 31, 2022

  • Object context load logic is moved to a separate class for better reusability.

  • with_existing_* / get_locked functions are removed. (not being used)

  • PG::resolve_oid() is moved to object_context.

  • Introduce with_clone_obc_only() (See ad1208f).

  • PG::with_locked_obc() do not distinguish bewtween head/clone

Example usage: #48756

Contribution Guidelines

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

@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from 05340b1 to b4a6d88 Compare November 6, 2022 13:52
@Matan-B Matan-B requested a review from rzarzynski November 6, 2022 13:59
@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch 2 times, most recently from e22edf1 to ee99154 Compare November 7, 2022 09:06
@Matan-B Matan-B marked this pull request as ready for review November 7, 2022 09:13
@Matan-B Matan-B requested a review from a team as a code owner November 7, 2022 09:13
@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from ee99154 to d3ead10 Compare November 7, 2022 09:19
Copy link
Contributor

@athanatos athanatos left a comment

Choose a reason for hiding this comment

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

Pretty close!

@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from d3ead10 to 9b76fcb Compare November 8, 2022 10:38
@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from 9b76fcb to 139d057 Compare November 9, 2022 10:04
@athanatos
Copy link
Contributor

Sorry, I meant that this bit

  for (auto& obc : obc_loader.obc_set_accessing) {
        obc.interrupt(::crimson::common::actingset_changed(is_primary()));
  }

should be pulled into an ObjectContextLoader method -- probably notify_on_change(bool primary).

@athanatos
Copy link
Contributor

/home/jenkins-build/build/workspace/ceph-pull-requests/src/crimson/osd/object_context_loader.cc:42:35: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
[oid, func=std::move(func), this](auto head) mutable

@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from 139d057 to 054ee19 Compare November 13, 2022 10:19
@Matan-B Matan-B requested review from athanatos and removed request for athanatos November 13, 2022 13:01
@github-actions
Copy link

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

* obc load logic is moved to a seperate class for better reusability.

* with_existing_* logic is removed. (not being used)

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
obc_set_accessing is owned by ObjectContextLoader and is
removed from PG.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
A with_clone_obc() variant, in PGBackend::rollback() with_locked_obc
is locking the head obc used, we should not lock the head object
obc again (as in by calling with_head_obc()).

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
The head or clone branch seperation can be done later on
(in with_obc()).

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
@Matan-B Matan-B force-pushed the wip-matanb-obc-loader branch from 054ee19 to 7f73a7e Compare November 22, 2022 10:31
@Matan-B Matan-B merged commit f597d42 into ceph:main Nov 29, 2022
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