[Yanel-development] [yarep] fallback not working

Josias Thöny josias.thoeny at wyona.com
Thu Nov 16 17:08:12 CET 2006


Hi all,

This is a yarep question. Sorry for posting to the yanel list. Is there
a better place for yarep questions?

The fallback mechanism of yarep allows to access files in the repository
which are not registered in the uid/path map.
If you want to read the content for a given path from yarep, and the
path is not found in the uid/path map, it will assume that path=uid and
read that path directly from the repository.

There is a problem with this approach:
- say there is a file /foo.txt in the repository, but it's not
registered in the path-map.
- someone reads the path "/foo.txt". it will work.
- now someone writes to this path. since the map has no uid for this
path, one will be created, say 1234, and the content will be written to
the file /1234

This means we now have two different files for the same path in the
repository, which is bad.

Furthermore, methods like getChildren() or delete() do not work if the
path is not registered in the map.

I therefore propose to remove the fallback, unless someone has an idea
how to fix it.
It probably could be replaced by a special map implementation which
directly maps paths to uids.

WDYT? 

Josias





More information about the Yanel-development mailing list