Project

General

Profile

Actions

Bug #13007

closed

unexpected scrub operations on hammer 0.94.3

Added by huang jun over 8 years ago. Updated over 8 years ago.

Status:
Won't Fix
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I build a cluster on hammer 0.94.3, and set
osd_scrub_max_interval = 31536000
osd_deep_scrub_interval = 31536000
osd_scrub_min_interval = 31536000
to disable scrub operation.

After i increase pg_num of data pool, the "ceph -w" shows there are many
PG doing scrub.

I add some debug code to PG::reg_next_scrub function, here the debug log:
2015-09-09 14:56:06.240370 7f47bb1db700 0 osd.0 pg_epoch: 21 pg[0.17( empty local-les=9 n=0 ec=1 les/c 9/9 8/21/4) [0,1] r=0 lpr=21 pi=8-20/1 crt=0'0 mlcod 0'0 peering] reg_next_scrub must_scrub 0 stats_invalid 1 osd_scrub_invalid_stats 1
2015-09-09 14:56:06.240460 7f47bb1db700 0 osd.0 pg_epoch: 21 pg[0.17( empty local-les=9 n=0 ec=1 les/c 9/9 8/21/4) [0,1] r=0 lpr=21 pi=8-20/1 crt=0'0 mlcod 0'0 peering] reg_next_scrub pg 0.17, scrub_reg_stamp 0.000000

In the code:
void PG::reg_next_scrub() {
if (scrubber.must_scrub ||
(info.stats.stats_invalid && g_conf->osd_scrub_invalid_stats)) {
scrubber.scrub_reg_stamp = utime_t();
} else {
scrubber.scrub_reg_stamp = info.history.last_scrub_stamp;
}
if (is_primary())
osd->reg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);
}

we should use ceph_clock_now(cct) to replace utime_t()

Actions

Also available in: Atom PDF