Project

General

Profile

Actions

Bug #15890

closed

osd:sched_time not actually randomized

Added by xie xingguo almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

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

Description

@OSDService::ScrubJob::ScrubJob(const spg_t& pg, const utime_t& timestamp,
double pool_scrub_min_interval,
double pool_scrub_max_interval, bool must)
: pgid(pg),
sched_time(timestamp),
deadline(timestamp) {
// if not explicitly requested, postpone the scrub with a random delay
if (!must) {
double scrub_min_interval = pool_scrub_min_interval > 0 ?
pool_scrub_min_interval : g_conf->osd_scrub_min_interval;
double scrub_max_interval = pool_scrub_max_interval > 0 ?
pool_scrub_max_interval : g_conf->osd_scrub_max_interval;

sched_time += scrub_min_interval;
double r = rand() / RAND_MAX;@

r will always be 0.


Related issues 1 (0 open1 closed)

Copied to Ceph - Backport #16080: jewel: osd:sched_time not actually randomizedResolvedAbhishek VarshneyActions
Actions

Also available in: Atom PDF