pjdarton edited a comment on Improvement JENKINS-15331

Features:

  • Added two new system properties that control behavior: "Util.deletionRetries" (an integer, defaults to 3) and "Util.deletionRetryWait" (an integer, defaults to 500ms).
  • Delete operations that affect directories now try to delete the entire contents of the directory, continuing on to subfolders etc even after encountering files that wouldn't die, before eventually throwing an exception about what wouldn't die. i.e. if a folder has a file "a", "b" and "c", and you can't delete "b", then "a" and "c" would get deleted (and you'll still get the exception about "b").
  • Delete operations now have multiple attempts at deleting things, so if not everything could be deleted first time around, maybe they'll get deleted 2nd/3rd etc time around. An exception is only thrown if all retry attempts are exhausted and there are still files/directories that won't delete. I have high hopes that this will mean that I will no longer suffer from JENKINS-15331 (possibly with a higher retry count, as Windows can take a dozen attempts to delete a file sometimes - I've set the defaults to mimic existing behavior).

Disclaimers:

  • I've not tested every possible place this is called from. To compensate, I have added some additional unit-tests that give me confidence that, at the very least, the changes should do no harm.

Since posting this comment in October 2012, I've been running a version of Jenkins LTS with this patch applied. I've not had file locking problems since (i.e. for about 4 months now). I'm therefore pretty sure that it fixes the problem.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to