You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Francisco Carriedo Scher <fc...@gmail.com> on 2011/11/02 10:30:32 UTC

Behaviour when removing nodes...

Hi there,

i do not have a clear idea about what happens in two defined situations
when operating against a repository.

The first situation is what truly happens when deleting a node with a
binary property. My repository stores mainly nodes with the following
structure:

nt:file
   |
   -- jcr:content (nt:resource type)
           |
           -- "some custom properties with String values"
           -- jcr:data (a potentially large Binary object)

Normaly i invoked the remove() method over the nt:file node described above
(let's say the root of the "file structure"). But when i check the
datastore placed in my hard disk it still contains the file that
corresponds to the Binary property just deleted. At this point two
questions arise: should i remove the entire structure of the nt:file node
(invoking dispose() method i guess) to actually erase the contents on disk?
and, what happens when other nodes contain the same Binary object that
corresponds to the same file deleted on disk, will such links be broken?,
does dispose() "perform smartly" like removing links on Linux (the file is
actually removed only when the last link is removed)?

The other question regards to hashing method used when storing files on the
harddisk. I found that regardless of the name and times uploaded, when a
file is stored it is named with the hash of the content. So if i upload the
very same file 2 or more times (even with distinct names) just one copy
will lay in the hard disk. Having this in mind i supposed that, in case the
file is already present on the repository, no upload would be performed
(just by checking if the "local hash" is already present) and thus a great
increase in performance would be obtained. But instead it seems that the
upload effectively takes place.

Can somebody clarify this two questions or point me to related
documentation?

Thanks in advance for your attention!

Re: Behaviour when removing nodes...

Posted by Francisco Carriedo Scher <fc...@gmail.com>.
Hi there,

i checked the URL you gave me out and one question was clarified (disposing
of non referenced files takes place through running a garbage collector)
but the other one (saving upload operations of files through checking if
they are already present checking the hash of the content) remains unclear
for me.

Can somebody clarify this question or point me to related documentation?

Thanks in advance for your attention!


2011/11/2 Francisco Carriedo Scher <fc...@gmail.com>

> Thank you very much Jukka, i looked over it and seems to be exactly what i
> need!
>
>
>
>
> 2011/11/2 Jukka Zitting <ju...@gmail.com>
>
>> Hi Francisco,
>>
>>
>> On Wed, Nov 2, 2011 at 10:30 AM, Francisco Carriedo Scher
>> <fc...@gmail.com> wrote:
>> > Can somebody clarify this two questions or point me to related
>> > documentation?
>>
>> See http://wiki.apache.org/jackrabbit/DataStore
>>
>> BR,
>>
>> Jukka Zitting
>>
>
>

Re: Behaviour when removing nodes...

Posted by Francisco Carriedo Scher <fc...@gmail.com>.
Thank you very much Jukka, i looked over it and seems to be exactly what i
need!



2011/11/2 Jukka Zitting <ju...@gmail.com>

> Hi Francisco,
>
>
> On Wed, Nov 2, 2011 at 10:30 AM, Francisco Carriedo Scher
> <fc...@gmail.com> wrote:
> > Can somebody clarify this two questions or point me to related
> > documentation?
>
> See http://wiki.apache.org/jackrabbit/DataStore
>
> BR,
>
> Jukka Zitting
>

Re: Behaviour when removing nodes...

Posted by Jukka Zitting <ju...@gmail.com>.
Hi Francisco,


On Wed, Nov 2, 2011 at 10:30 AM, Francisco Carriedo Scher
<fc...@gmail.com> wrote:
> Can somebody clarify this two questions or point me to related
> documentation?

See http://wiki.apache.org/jackrabbit/DataStore

BR,

Jukka Zitting