OpenLiberty / liberty-arquillian

Arquillian Liberty Managed and Remote containers
Apache License 2.0
10 stars 29 forks source link

retry deleting files #46

Closed benjamin-confino closed 5 years ago

benjamin-confino commented 5 years ago

Signed-off-by: Benjamin Confino benjamic@uk.ibm.com

chyt commented 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.

benjamin-confino commented 5 years ago

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.

benjamin-confino commented 5 years ago

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.