Bug #13991
closedosd: fix ScrubJob compare function
0%
Description
If we not consider the deadline in compare function. Some pgs would not
be scheduled when the deadline arrives.
Such as, there is ScrubJob A in sched_scrub_pg. A.pgid = 1.1, A.sched_time = 0:00,
A.deadline = 23:00. Now we send a command ceph pg scrub 1.2, so osd would
add a new ScrubJob B. It is possible that B.pgid = 1.2, A.sched_time = 0:00,
A.deadline = 0:00. Current strategy ScrubJob B would be scheduled after A.
But A.deadline is much later than B.deadline. So it possible that job B is
not scheduled when the job B deadline arrives.
Updated by Xinze Chi over 8 years ago
If we not consider the deadline in compare function. Some pgs would not
be scheduled when the deadline arrives.
Such as, there is ScrubJob A in sched_scrub_pg. A.pgid = 1.1, A.sched_time = 0:00,
A.deadline = 23:00. Now we send a command `ceph pg scrub 1.2`, so osd would
add a new ScrubJob B. It is possible that B.pgid = 1.2, A.sched_time = 0:00,
A.deadline = 0:00. Current strategy ScrubJob B would be scheduled after A.
So it possible that job B is not scheduled when the job B deadline arrives if ScrubJob
A spend much time on scrubbing.
I think we should give the ScrubJob highest priority if it is trigged by manually.
So we should consider the ScrubJob deadline. deadline == sched_time if ScrubJob is
trigged by manually.
Updated by Kefu Chai over 8 years ago
in practice, it does not happen. as the chance that A.sched_time == B.sched_time is rare.
Updated by Kefu Chai over 8 years ago
- Status changed from New to Can't reproduce
Updated by Kefu Chai over 8 years ago
- Status changed from Can't reproduce to Won't Fix