2 Replies Latest reply on Oct 16, 2012 12:38 PM by dmitry.zhuravlev

    Probably bug in modeshape workspace query reindexing

    dmitry.zhuravlev

      I encountered the following problem. I run modeshape 2.8.3 with workspace which have a lot of files. Each new file added in repository every 1 minute.

      After 2 days full time work I noticed that not all of the files are founded then I run JCRSQL2 query. I have mixin:

       

      [nic:time] mixin

        - nic:startTime (DATE) mandatory

       

      Query is something like:

      SELECT [jcr:path] FROM [nt:file] WHERE [nic:startTime]=CAST('2012-10-15T20:00:00' AS DATE)

       

      Query successfully returned only files which are added
      recently, but files older than 1 day not returned by the query.

      Then I try to restart modeshape, set
      JcrRepository.Option.REBUILD_QUERY_INDEX_ON_STARTUP to "always" and JcrRepository.Option.QUERY_INDEXES_REBUILT_SYNCHRONOUSLY to "true". But there is no luck with this options.

       

      Only after I call reindex by myself:

       

      {code:java}

      Session session =  repository.login();

      ((org.modeshape.jcr.api.Workspace)session.getWorkspace()).reindex("/");

      {code}

       

       

      Old files are successfully returned by the query.

        • 1. Re: Probably bug in modeshape workspace query reindexing
          hchiorean

          Hi Dmitry,

           

          A couple of questions:

           

          - has this happened only after a certain number of files / a certain amount of time or has this been happening from the beginning ?

          - the problem is that older or newer files are not found ?

          - is there any similarity between the files which aren't being found (besides their age)

          - did you try turning on DEBUG, to see if there are any suspicious messages ? Rebuild on startup = always + QUERY_INDEXES_REBUILT_SYNCHRONOUSLY = true should be equivalent to the manual workaround (although this is a very expensive operation for large amounts of data)

          • 2. Re: Probably bug in modeshape workspace query reindexing
            dmitry.zhuravlev

            Hi Horia,

             

            - This are happens after application works at least 2 days without restart. I have noticed above that every 1 minute this application put a new file into repository. But I think that actually this happens after certain amount of files, because after application restart I still can't find any files older than several days.

            - The problem is that older files are not found.

            - No. Only their age.

            - Do you mean turn DEBUG in modeshape logging? This I not doing yet...

            I know, that rebuild on startup always and rebuild synchronously a expensive operation, but this operations doesn't help me, so I let them by default.

            Only ((org.modeshape.jcr.api.Workspace)session.getWorkspace()).reindex("/"); helps me. As I can see in application debug, modeshape for some reason don't do this at startup....