cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Trying to understand removal of orphaned nodes

gronfelt
Champ in-the-making
Champ in-the-making
I'm trying to understand how the contentstore configuration works. I've read the wiki, but I can't get it to work. This is what I've done:

1. I've changed the "protectDays" property to 1:

<property name="protectDays" >
        <value>1</value>

2. I've removed a file and then deleted it permanently in the "Manage Deleted Items" interface.

3. Then I stop Alfresco, adjust the time and date to 03:55, two days ahead, and restart Alfresco.

Shouldn't the expected outcome be that the deleted file is moved to contentstore.deleted? The actual outcome is that nothing shows up there. I've done no modifications in the appropriate files, other than changing the protectDays value.

How can I configure logging to see what's happening? What would the expected log result be if the cleanup job is running as expected?

Edit: This is on 3.2r2 and 3.2r.
6 REPLIES 6

gronfelt
Champ in-the-making
Champ in-the-making
A follow-up question: I seem to have a lot of nodes that are orphaned, at least I cannot find the .bin file names in the table alf_content_url. What will happen if I delete those files? Would it break anything, even thought they seems to be removed from the database?

I realize that this is NOT the right way to work things, but I'm running out of disk space because of these abandoned nodes and I thought it might be a good way to handle that until I can figure out why the cleanup job isn't working.

lotharm
Champ on-the-rise
Champ on-the-rise
Hi gronfelt,

the table alf_content_url is only used by the cleaner job. That is, it is used by it to hold the possibly very very large list of files of the contentstore.
After completion, the cleaner job empties the alf_content_url table. So, might be that if you found some rows in alf_content_url, the job was just still running.

Per default it moves the file to the directory contentstore.deleted. If you have files there, the job did run. Btw. to do proper housekeeping, the contentstore.deleted directory needs to be cleaned regularly….

regards,
  lothar

gronfelt
Champ in-the-making
Champ in-the-making
Thank you for answering.

I have a couple of Alfresco installations up and running and I just checked the databases and alf_content_url is populated in everyone of them and there ought to be no jobs running now, since it's almost 2 pm, local time.

How long is the cleanup job expected to take? I have one server, where I removed one file, which has been running for just over two hours since 4 am (I changed the date and time on that machine) and so far contentstore.deleted is completely empty.

How can I set logging to see if the job is running? Would this be an appropriate setting?
log4j.logger.org.alfresco.repo.content.cleanup=debug

lotharm
Champ on-the-rise
Champ on-the-rise
org.alfresco.repo.content.cleanup.ContentStoreCleaner is the logger of the class.
There should be some DEBUG logging like this on completion:
  if (logger.isDebugEnabled())
            {
                logger.debug("   Content store cleanup completed.");
            }

Maybe it is helpful to enable the quartz logger to see if the job is started at all. Logger is org.quartz=debug if I am right.

If all your alfresco installations have full alf_content_url tables, could it be that you do a daily restart while the jobs are running?

lothar

gronfelt
Champ in-the-making
Champ in-the-making
Well, this makes me feel somewhat like an idiot, but the problem is solved: For some reason the contentStoreCleanerTrigger bean was commented out in the file scheduled-jobs-context.xml and I hadn't seen that, even though I checked the file earlier to find out the job was supposed to start.

That bean seems to be commented out by default in later releases (I have not changed anything myself and I verified it with other installations) is there a reason for this? Obviously this prevents the job from running, but perhaps there is some thought behind that? Or is it some mistake that ought to be reported in the JIRA?

Edit: Anyway, thanks a lot for your input Lothar, it's really appreciated.

sharifu
Confirmed Champ
Confirmed Champ
on alfresco 4.2.c there are 4 files. which do i edit so it can delete orphaned files and old transfer log files and how do i know it is running. I have over 20gb of transfer log files dating to 2011 which i want deleted.


[root@hector tomcat]#  find . -type f -name "scheduled-jobs-context.xml"
./webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Search/lucene/scheduled-jobs-context.xml
./webapps/alfresco/WEB-INF/classes/alfresco/scheduled-jobs-context.xml
./work/Admin/localhost/alfresco/WEB-INF/classes/alfresco/subsystems/Search/lucene/scheduled-jobs-context.xml
./work/Admin/localhost/alfresco/WEB-INF/classes/alfresco/scheduled-jobs-context.xml