Commit c62cb02e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Another crack at fixing batchexp dequeue race condition.

parent d1571c35
......@@ -524,8 +524,15 @@ else {
# XXX. The batch daemon might already have the experiment, but
# not have shipped it off to startexp. Use a cancel flag since
# that is the only consistent mechanism to tell the batch daemon
# what it should do.
$experiment->SetCancelFlag(EXPTCANCEL_DEQUEUE);
# what it should do. Otherwise, we can just change its state
# to yank it from the queue.
#
if ($batchstate ne BATCHSTATE_UNLOCKED()) {
$experiment->SetState(EXPTSTATE_SWAPPED);
}
else {
$experiment->SetCancelFlag(EXPTCANCEL_DEQUEUE);
}
}
elsif ($inout eq "modify") {
ExitWithStatus(1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment