[
https://issues.apache.org/jira/browse/MAPREDUCE-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882755#action_12882755
]
Scott Chen commented on MAPREDUCE-1845:
---------------------------------------
I have carefully read the code. I think this bug is not that easy to trigger.
Because when update tasksDueToMinShare and tasksDueToFairShare, tasksToPreempt
will check
{code}
curTime - sched.getLastTimeAtMinShare() > minShareTimeout
curTime - sched.getLastTimeAtHalfFairShare() > fairShareTimeout
{code}
So they may turn negative only when they got the timeout and over-scheduled at
the same time.
And this two thing must happen between update() and preemptIfNecessary():
{code}
update()
// spent lots of time here so we get timeout
// get over-scheduled tasks
preemptIfNecessary()
{code}
It is not likely to happen unless people set starving timeout to be very short.
But it is still good to fix it.
I will write a unit test to simulate this situation.
> FairScheduler.tasksToPeempt() can return negative number
> --------------------------------------------------------
>
> Key: MAPREDUCE-1845
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1845
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: contrib/fair-share
> Affects Versions: 0.22.0
> Reporter: Scott Chen
> Assignee: Scott Chen
> Fix For: 0.22.0
>
> Attachments: MAPREDUCE-1845.20100717.txt
>
>
> This method can return negative number. This will cause the preemption to
> under-preempt.
> The bug was discovered by Joydeep.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.