And after run

GarbageCollector gc;
SessionImpl si = (SessionImpl)session;
gc = si.createDataStoreGarbageCollector();

// optional (if you want to implement a progress bar / output):
// gc.setScanEventListener(this);
gc.scan();
gc.stopScan();

// delete old data
gc.deleteUnused();

all deleted documents are supposed to be remove from repository/datastore?

On Mon, Mar 9, 2009 at 6:38 PM, Paco Avila <[email protected]> wrote:

> Do you mean that GC only make sense if I delete documents from the
> repository? I don't think that never run GC and keep all the documents
> (deleted one included) is a good alternative in repositories with several GB
> of size and big documents.
>
> On Mon, Mar 9, 2009 at 6:20 PM, Jukka Zitting <[email protected]>wrote:
>
>> Hi,
>>
>> On Mon, Mar 9, 2009 at 6:02 PM, Paco Avila <[email protected]> wrote:
>> > The real question should be "Do I need to call the garbage collection in
>> my
>> > app" ? :P
>> >
>> > And the answer seems to be "YES"!
>>
>> Well, it depends. If your usage patterns permit, you could also just
>> ignore garbage collection entirely.
>>
>> If you don't have lots of short-lived files (or binary properties) in
>> the repository, then the cost of keeping some extra unused binaries in
>> the data store may well be smaller than the cost of getting rid of
>> them.
>>
>> It's worth estimating the rate at which you remove binary data from
>> the repository, and using the result to calculate the best garbage
>> collection intervals. The low (and declining) cost of storage and the
>> typical usage patterns of many content applications (especially ones
>> with versioning) may well suggest that the most economic alternative
>> is to never run the garbage collector.
>>
>> BR,
>>
>> Jukka Zitting
>>
>
>
>
> --
> Paco Avila
> GIT Consultors
> tel: +34 971 498310
> fax: +34 971496189
> e-mail: [email protected]
> http://www.git.es
>



-- 
Paco Avila
GIT Consultors
tel: +34 971 498310
fax: +34 971496189
e-mail: [email protected]
http://www.git.es

Reply via email to