Merge pull request #60661 from ronen-fr/wip-rf-scheduledeep

osd/scrub: fix 'schedule-deepscrub' test asok command

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
Ronen Friedman 2024-11-19 10:47:26 +02:00 committed by GitHub
commit 29546089ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -766,8 +766,13 @@ void PgScrubber::on_operator_periodic_cmd(
asok_response_section(f, true, scrub_level, stamp);
if (scrub_level == scrub_level_t::deep) {
const auto saved_shallow_stamp = m_pg->info.history.last_scrub_stamp;
// this call sets both stamps
m_pg->set_last_deep_scrub_stamp(stamp);
// restore the shallow stamp, as otherwise it will be scheduled before
// the deep, failing whatever test code called us (this is a test-only
// interface).
m_pg->set_last_scrub_stamp(saved_shallow_stamp);
} else {
m_pg->set_last_scrub_stamp(stamp);
}