OnDemand User Group

Support Forums => OD/WEK & JAVA API => Topic started by: jg on January 10, 2017, 05:31:45 AM

Title: Does the deleteDocs evaluates the retention time?
Post by: jg on January 10, 2017, 05:31:45 AM
Dear all

Does the ODFolder.deleteDocs method evaluates the retention times before executing it?
Is there way to enforce this?

Regards
Jochen
Title: Re: Does the deleteDocs evaluates the retention time?
Post by: Lars Bencze on March 10, 2017, 05:17:31 AM
No, it doesn't care about the retention time. It simply grabs the index data row from the DB table and shreds it. (The document itself is left on disk)

It sounds to me that what you really want to do is to run arsmaint -t <date>. I don't know about a smart way to check that via the Java API, but you could certainly check the database for expiry dates and only run arsdoc delete if the test evaluates to TRUE.
But normal document expiry is best handled by running arsmaint by the documentation.
Title: Re: Does the deleteDocs evaluates the retention time?
Post by: Alessandro Perucchi on March 13, 2017, 03:05:05 AM

Well if you do that (arsdoc delete OR ODFolder.deleteDocs) it will only delete the indexe(s) from the database and that's it.
No retention, nothing...

The object behind in the storage manager (cache or tsm or...) will not be deleted. Meaning that even with "arsmaint -t <date>" it will not delete the orphans objects in the storage manager.
This would be a "manual" operation to remove that orphan object.
Title: Re: Does the deleteDocs evaluates the retention time?
Post by: Justin Derrick on March 13, 2017, 04:03:06 AM
And of course, we should mention that you must verify that the object doesn't contain any other documents.  If you delete the object, and that object is referred to by other documents, then you'll render those other documents irretrievable. 

Another way to think about it:

If the document was eligible for expiration, you wouldn't need to issue the 'deleteDocs' call -- because it wouldn't be there for you to delete.  :)

You didn't really give us much information about your situation, so I'm wondering if there's a configuration problem you're trying to correct.

-JD.