Hi,

On Fri, Feb 14, 2014 at 8:42 AM, Axel Hanikel <[email protected]> wrote:
> The org.apache.jackrabbit.oak.plugins.segment.file.TarFile constructor reads
> through the whole tar file, building up an in-memory map from segment uuid
> to the position in the file. This is done each time the repository is
> started, and it takes quite a long time. Shouldn't this index be persisted
> somehow, and be updated when the tar file is being written to?

Yes, an index will most likely be needed. So far one hasn't been added
to keep things simple and to gather more experience about the size
distribution and typical access patterns of the segments.

My idea so far for such an index has been to include a special
directory at the end of each tar file, a bit like the zip format does.
This directory could list the identifier, location and size of all the
segments included in that tar file. The required size would be 24
bytes per segment, so the size overhead would be insignificant
compared to the minimum of 1kB of space taken by each segment in the
tar format.

> Should I create an issue for this or am I missing anything?

An sub-task of OAK-593 would be nice.

BR,

Jukka Zitting

Reply via email to