VERIFIED SOLUTION i

Reasons for Purge not deleting folders in concurrency mode in EngageOne


 
Users may encounter folders that are not deleted when running Purge, though the files within the folder are deleted.

The reason being in concurrency mode, purge is run as a multi-threaded process, so it could be the folder is locked or may be that folders are open in more than one thread. 

Folders cannot be deleted until all files are deleted in that folder and folders cannot be deleted when another thread still has it open. 

The file deletion and DB updates are spread across the numerous threads. 

Another possibility is the folder may not be deleted if Purge process has not completed or has terminated unexpectedly midway without completion. 

A bit background on this: 

When Purge process is run, it looks in the database if there are any files to delete. Those files reside in say, folder1. Now, when Purge will run, it will start deleting the files in that folder1. If all the files are deleted and thereafter, for some reasons, Purge is terminated unexpectedly, the folder1 will not be deleted. 

So when Purge is run again, it will again look into the database if there are any files to delete. Given that there is no files present in folder1, that empty folder1 would be skipped and therefore no matter how many times you run Purge, it will not delete the empty folder1. Purge will proceed to delete other folders if there are files present within those folders. 

We would therefore suggest to manually delete the empty folder(s) and re-run Purge. This should delete the files in those folders and also the folders themselves, assuming Purge is run to completion without any interruptions. 

You may also have that folder open by a process and after having run purge, the folder will be marked as deletion, however you'll still see that folder unless you have terminated the process that's accessing that folder or rebooted the server. 
UPDATED:  April 14, 2017