Project

General

Profile

Bug #15890

osd:sched_time not actually randomized

Added by xie xingguo about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/15/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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

Copied to Ceph - Backport #16080: jewel: osd:sched_time not actually randomized Resolved

History

#2 Updated by Kefu Chai about 3 years ago

  • Status changed from New to Need Review

#3 Updated by Yuri Weinstein about 3 years ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Loic Dachary about 3 years ago

  • Copied to Backport #16080: jewel: osd:sched_time not actually randomized added

#5 Updated by Loic Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF