cancel
Showing results for 
Search instead for 
Did you mean: 

contentStoreCleaner configuration

itayh
Champ in-the-making
Champ in-the-making
Hi,

We are using our own backup and snapshots for the repository, so we have the next configuration in content-services-context.xml:
   <bean id="contentStoreCleaner" class="org.alfresco.repo.content.cleanup.ContentStoreCleaner" >
      <property name="dictionaryService">
         <ref bean="dictionaryService" />
      </property>
      <property name="nodeDaoService" >
         <ref bean="nodeDaoService" />
      </property>
      <property name="avmNodeDAO">
            <ref bean="avmNodeDAO"/>
      </property>
      <property name="transactionService" >
         <ref bean="transactionService" />
      </property>
      <property name="protectDays" >
         <value>1</value>
      </property>
      <property name="stores" >
         <list>
            <ref bean="fileContentStore" />
         </list>
      </property>
   </bean>

When we delete files using nodeService.deleteNode, we can not find them in the web client but in the file system I still see the UUID.bin files (even after a week). When quring the alf_node table in the DB I see no column with the specific UUID. We are using 2.1 version.
Are we doing something wrong?

Thanks in advance,
  Itay
7 REPLIES 7

derek
Star Contributor
Star Contributor
Hi,
If you search for the .bin file using:
   select * from alf_node_properties where string_value like 'contentUrl=%<UUID>%';
and nothing turns up, then you're experiencing a bug.  The content store cleaner underwent some major fixes during the 2.1.x and 2.2.  You'll find those bug fixes in Labs 3.
Regards

itayh
Champ in-the-making
Champ in-the-making
Hi Derek,

Thanks for the quick response.
I ran the query that you wrote and it return 0 rows for the UUID that is existing in the content store (UUID.bin).

Some questions
1 - We have a LOT of content in the content store that was suppose to be deleted. We thought of delete all the UUID.bin files from the files system that does not appear in the DB. Is it safe?
2 - If we return to original configuration with the deletedContentBackupListener  listener and then run a cron job to delete the .deleted files, will it be OK? I mean that the .delete files are already deleted from the DB, correct?

Thanks in advance

derek
Star Contributor
Star Contributor
Hi,
You can always clean out the contentstore.deleted.  Usually, you would clean this out just after your backup procedure runs.
Regards

itayh
Champ in-the-making
Champ in-the-making
Hi Derek,

Maybe I did not explain myself good enough. After removing the deletedContentBackupListener  listener from the contentStoreCleaner bean (as the wiki say) the content is deleted from the DB, we can not see it in the web client BUT it still exist in contentstore (not in the contentstore.deleted) and this is the big problem for us. We have Hugh amount of data in the  contentstore (not in the contentstore.deleted)  that was already deleted so we need to clean it some how and understand why it happen. That is why I suggested the 2 solutions:

1 - We have a LOT of content in the content store that was suppose to be deleted. We thought of delete all the UUID.bin files from the files system that does not appear in the DB. Is it safe?
2 - If we return to original configuration with the deletedContentBackupListener listener and then run a cron job to delete the .deleted files, will it be OK? I mean that the .delete files are already deleted from the DB, correct?

But I wanted to consult people before doing such steps.

Any Idea?

Thanks in advance

derek
Star Contributor
Star Contributor
Hi,
If you search for the .bin file using:
   select * from alf_node_properties where string_value like 'contentUrl=%<UUID>%';
and nothing turns up, then you're experiencing a bug.  The content store cleaner underwent some major fixes during the 2.1.x and 2.2.  You'll find those bug fixes in Labs 3.
Regards

itayh
Champ in-the-making
Champ in-the-making
Hi Derek,

I understand what you said but the situation is that we have 50G of real content and 300G of content that was deleted but because of the bug was not deleted from the contentstore (not contentstore.deleted). We must somehow  clean those 300G . Upgrading now to 3.0 Will not clean those 300G  and that is why I asked if the solution below is OK.
Also until upgrading to 3.0, if we return to the original configuration (return deletedContentBackupListener listener to the contentStoreCleaner bean) will it help?

Thanks

derek
Star Contributor
Star Contributor
Hi,
Of course you can manually delete the files anytime you wish.  Upgrading and getting a working version of the content store cleaner will have the effect of cleaning out the orphaned content.  Whether or not you choose to put in the listener is immaterial.
Regards