jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1214) DocId.UUIDDocId should not have a string attr uuid, but two long's lsb and msb
Date Tue, 13 Nov 2007 08:32:50 GMT

    [ https://issues.apache.org/jira/browse/JCR-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542065
] 

Marcel Reutegger commented on JCR-1214:
---------------------------------------

For simplicity I would rather use an instance of UUID instead of two longs.

Ard wrote:
> I think we might be able to remove the uuid entirely ...

no, that's not possible. the critical use case is index segment merges. consider the following
index segments:

i1, i2, i3

now let's assume i1 contains a UUIDDocId, which refers to a node in i2. then i2 and i3 are
merged and replaced by i4:

i1, i4

on next access to the above mentioned UUIDDocId it will realize that the reader that was used
to get the document number is gone and as a consequence will be forced to get the document
number again and adjust the reader reference to i4.

hope that makes sense... ;)

> DocId.UUIDDocId should not have a string attr uuid, but two long's lsb and msb 
> -------------------------------------------------------------------------------
>
>                 Key: JCR-1214
>                 URL: https://issues.apache.org/jira/browse/JCR-1214
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>    Affects Versions: 1.3.3
>            Reporter: Ard Schrijvers
>             Fix For: 1.4
>
>
> After JCR-1213 will be solved, lots of DocId.UUIDDocId can be cached, and not being cleaned
after every gc(). The number of cached UUIDDocId can grow very large, depending on the size
of the repository.  Therefor, instead of storing the private String uuid; we can make it more
memory efficient by storing 2 long's, the lsb and msb of the uuid.  Storing 1.000.000 of parent
UUIDDocId might differ about 100Mb of memory. 
> I even did test by removing the entire uuid string, and not use msb or lsb, because,
when everything works properly (with references to index reader segments (See JCR-1213)),
the uuid is never needed again: in 
> UUIDDocId getDocumentNumber(IndexReader reader) throws IOException {
> we could set uuid = null just before the return. It works perfectly well, because when
an index reader is recreated, the CachingIndexReader will be recreated, hence DocId[] parents
will be recreated. 
> So, IMO, I think we might be able to remove the uuid entirely when the docNumber is found
in DocId.UUIDDocId (obviously after JCR-1213)
> WDOT?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message