Bug #13991
closed
osd: fix ScrubJob compare function
Added by Xinze Chi over 8 years ago.
Updated over 8 years ago.
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.
make a mistake, close it.
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.
- Assignee set to Kefu Chai
in practice, it does not happen. as the chance that A.sched_time == B.sched_time is rare.
- Status changed from New to Can't reproduce
- Status changed from Can't reproduce to Won't Fix
Also available in: Atom
PDF