Merge pull request #42951 from ronen-fr/wip-ronenf-pg-dtor

osd/scrub: destruct the scrubber shortly before the PG is destructed

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>-
Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Ronen Friedman 2021-09-13 14:23:52 +03:00 committed by GitHub
commit 4ce3989f0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1756,6 +1756,11 @@ PrimaryLogPG::PrimaryLogPG(OSDService *o, OSDMapRef curmap,
m_scrubber = make_unique<PrimaryLogScrub>(this);
}
PrimaryLogPG::~PrimaryLogPG()
{
m_scrubber.reset();
}
void PrimaryLogPG::get_src_oloc(const object_t& oid, const object_locator_t& oloc, object_locator_t& src_oloc)
{
src_oloc = oloc;

View File

@ -1475,7 +1475,7 @@ public:
const PGPool &_pool,
const std::map<std::string,std::string>& ec_profile,
spg_t p);
~PrimaryLogPG() override {}
~PrimaryLogPG() override;
void do_command(
const std::string_view& prefix,