[torquedev] [Bug 82] Unnecessary code in send_job

bugzilla-daemon at supercluster.org bugzilla-daemon at supercluster.org
Tue Nov 30 18:38:58 MST 2010


http://www.clusterresources.com/bugzilla/show_bug.cgi?id=82

--- Comment #6 from Glen <glen.beane at gmail.com> 2010-11-30 18:38:57 MST ---
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > job_purge() changes and deletes files on disk. It doesn't matter if it is
> > > called from a child process; it is still an important function.
> > > 
> > > There might be some bug or not. I don't know. I'm not commenting on that. I'm
> > > just saying that the requirement for job_purge is not invalidated by being
> > > called from a child process.
> > 
> > this is a good point, we need to make sure that the files associated with the
> > job get cleaned up, but the parent process must call job_purge() at some point,
> > otherwise the job would persist in the parent process's linked lists
> > indefinitely (until a reboot, at which time the job would not be recovered
> > because the job_purge called by the child removed the files).
> 
> The real job_purge is called from post_movejob (and only if the move succeeded
> of course).

right

net_move calls send_job with a post_movejob as the argument for the post_func
parameter.  In send_job the parent sets up a work task to run post_movejob when
the child exits.  The job_purge in the child is redundant, and the parent is
the right place to do it.

The only other place send_job() is called is in
req_runjob()->svr_startjob()->svr_strtjob2() to send the job to a mom. We don't
want the job to get purged in this case, and svr_strtjob2 sets up its own post
function to do any required cleanup.

This change looks valid to me.

-- 
Configure bugmail: http://www.clusterresources.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the torquedev mailing list