[Yanel-dev] New Patch for Yarep: Bugfix

Balz Schreier balz.schreier at gmail.com
Mon Oct 25 07:51:39 CEST 2010


Yes, Claudio implemented something like that but I did not find the
"migration".

What I found is:
- If you edit the item and save it again, it gets save at the new location
(but unfortunately, the old one does not get deleted on disk!)
- If you just access the item, the file stays where it is (it does not get
migrated)

The problem I am mentioning here is:
- The search engine uses the "exists()" method in order to display search
results of really existing files (the index might not be in sync anymore).
So because the exists() method says that the node does not exist (because
the node has not been migrated yet to the new location), the node is also
not displayed by the search.

So my patch has actually nothing to do with the migration of nodes. This
patch needs to be applied anyways at otherwise content items can not be
found anymore, once the splitpath is configured.

Cheers
Balz

On Mon, Oct 25, 2010 at 12:07 AM, Michael Wechner <michael.wechner at wyona.com
> wrote:

>  On 10/24/10 6:03 PM, Balz Schreier wrote:
>
> Hi,
>
>  I have fixed a bug in Yarep in the existsNode() method.
> Some weeks ago, splited file paths were introduced. It was implemented to
> be backwards compatible (see getNode() method), but backwards compatibili=
ty
> was not considered in the exists-method.
>
>
> you mean if you have a mix of splitted and non-splitted paths?
>
> IIRC Claudio implemented something like an automagic data migration for
> such
> cases, or did I miss something? I need to have a closer look at the code
> again ....
>
>
>
>  Please let me know by when this gets submitted to yarep svn.
>
>
> I cannot tell you right now :-(
>
> Cheers
>
> Michael
>
>
>  Cheers
> - B
>
>  Index:
> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRepository.j=
ava
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> ---
> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRepository.j=
ava (revision
> 54092)
> +++
> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRepository.j=
ava (working
> copy)
> @@ -396,7 +396,7 @@
>              path =3D path.substring(0, path.length() - 1);
>          }
>          if (splitPathEnabled) {
> -            return map.exists(new Path(splitPath(path)));
> +            return map.exists(new Path(splitPath(path))) || map.exists(n=
ew
> Path(path));
>          } else {
>              return map.exists(new Path(path));
>          }
>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010102=
5/527d51ba/attachment.htm


More information about the Yanel-development mailing list