Closed benjamin-confino closed 5 years ago
Is it clear what the underlying cause of the file locking is on Windows? I have seen this problem frequently in other projects as well when trying to delete applications from the server, which leads me to think it could be a Liberty issue rather than an undeploy implementation issue.
Although it probably works, I don't know if I'm comfortable just putting in a retry without understanding the reason for the failure. Also, if retry attempts are introduced, perhaps the retry count and interval should be configurable.
I asked an engineer who's worked on the file locking code but he was busy, when he's available I'll see if I get you an answer to the underlying cause.
As for making it configurable, that sounds reasonable to me and I will update the commit.
I've spoken to Andrew directly and implemented his suggestions.
@chyt I tracked down the reason why liberty holds onto file locks. It turns out it's part of a performance optimisation that holds onto files for a couple of seconds encase another part of liberty needs that file.
So we will need to handle that when deleting archives with something like this patch.
Signed-off-by: Benjamin Confino benjamic@uk.ibm.com