cancel
Showing results for 
Search instead for 
Did you mean: 

History nodes should be "Orphean" but are not

fiston
Champ in-the-making
Champ in-the-making

Hi all,

I have a problem with some nodes that should be "Orphean" but are not.

Using the Alfresco SDK, I was uploadling a document with ContentWriter:

         ContentWriter contentWriter = serviceRegistry.getContentService().getWriter(nodeRef,          ContentModel.PROP_CONTENT, true);

         contentWriter.putContent(inputStream);

The properties version.store.enableAutoVersioning is set to true so every time I was modifing the content of this node, a new version was created. After a while, my document was to version 1.21235.


This 21235 versions were taking too much space on disk, so I decided to remove that file from Share, then remove it from the trash. T
hinking that all history versions will became "orphean" and will be removed from the contentstore when the cleanup trigger will be called.

But after running the contentStoreCleanerTrigger, all of my history files are still present in contentstore.

There is no more document in archiveStore.
When I look into table alf_content_url I find all of my history files (using the "content_url") and they have no value at "orphan_time", so they are not considered as "Orphean" ?

Is there any reason why some nodes (like previous versions) does not become "Orphean" after been removed from trash ?
Is there something that I can do in order to restore a valid state ? 

Thanks,

6 REPLIES 6

kaynezhang
World-Class Innovator
World-Class Innovator

By default  orphaned content will keep 14 days, so only content that are 14 days ago wil be deleted

cesarista
World-Class Innovator
World-Class Innovator

Hi:

As Kayne says orphaned content (deleted from trash) has 14 days period of retention. Then it is moved to contentstore.deleted. HINT: Another way for deleting versions is to remove versionable aspect for the document.

Check this figure from Toni de la fuente's blog for understanding content deletion in Alfresco:

Understanding Alfresco Content Deletion – : : blyx.com : : Blog : : Toni de la Fuente : : 

http://blyx.com/wp-content/uploads/2014/08/Slide1.png 

If you need to delete content urgently because your disk is near full, you can change these properties in alfresco-global.properties

system.content.eagerOrphanCleanup=true
#system.content.orphanProtectDays=14

system.content.orphanProtectDays=1

system.content.orphanCleanup.cronExpression=0 0 4 * * ?

For tracking orphans, you can query in your database:

SELECT * FROM alf_content_url where orphan_time is not null 

And finally, you can control the maximum number of versions with the addon:

GitHub - jottley/alfresco-maxversion-policy 

Regards.

--C.

fiston
Champ in-the-making
Champ in-the-making

The problem is that the files are not orphaned.

- I've removed a content file

- then I emptied the trash

- then I set the orphanProtectDays to 0

- finally I ran contentStoreCleanerTrigger manually

The content files and all of its versions (about 21000) are not set as orpheaned.

orphan_time is null for each of those node

But they are present on contentstore

Nodes are no more available in workspace or archive Stores so I cannot set any aspect.

I think something went wrong when I've emptying the trash due to the number of versions of this nodes and I am looking for a solution in order to remove all of the versions of this file from contentstore.

Thanks

kaynezhang
World-Class Innovator
World-Class Innovator

You mean you delete the node from share,the node is archived ,but the version hierarchy of that node are not archived?

fiston
Champ in-the-making
Champ in-the-making

Yes the version hierarchy of that node are not archived. 

I can find them on database and contentstore.

kaynezhang
World-Class Innovator
World-Class Innovator

I did not encounter this problem, for versinalbe node We turn off archive mechnism in type definition to save storage.
In alfresco repository,if we use VersionService to delete(archive) a node ,it will also delete(archive) the node's version history.
Maybe it is a bug of share.