sbsdev / mdr2

Production Management Tool for DAISY Talking Books
GNU Affero General Public License v3.0
0 stars 0 forks source link

Not all files are deleted upon archiving #44

Closed egli closed 9 years ago

egli commented 9 years ago

Under some circumstances we get the following entry in the log:

 2015-04-29 08:03:38,863 ERROR [mdr2.util] (Thread-464 (HornetQ-client-global-threads-410738640)) #<DirectoryNotEmptyException java.nio.file.DirectoryNotEmptyException: /var/lib/mdr2/recorded/20111>

This seems to be a problem in conjunction with nfs as there are some .nfsxxxxxxx files in the directory. Maybe we need to put a delay in the tree walker that does the delete? Or we could have a reaper that regularly cleans directories of archived productions.

egli commented 9 years ago

Seems like other people had this problem before: https://bz.apache.org/bugzilla/show_bug.cgi?id=45786#c3

egli commented 9 years ago

I still get

2015-04-30 12:14:43,371 ERROR [mdr2.util] (Thread-1307 (HornetQ-client-global-threads-410738640)) #<DirectoryNotEmptyException java.nio.file.DirectoryNotEmptyException: /var/lib/mdr2/recorded/20127>

in the log

egli commented 9 years ago

For now I increase the retry sleep. Let's see if that helps. Maybe in the end we'll just resort to

(sh "rm" "-rf" directory)
egli commented 9 years ago

Now it is slightly better but still totally unacceptable:

 2015-04-30 17:00:55,418 ERROR [mdr2.util] (Thread-35 (HornetQ-client-global-threads-1292880237)) #<FileSystemException java.nio.file.FileSystemException: /var/lib/mdr2/recorded/20131/.nfs000000008c17288c000008fd: Device or resource busy>
egli commented 9 years ago

Haven't seen this problem in production anymore