3 Replies Latest reply on Feb 4, 2016 2:24 AM by hchiorean

    Modeshape appears to re-index after restart even if there are no changes

    ma6rl

      I am currently running Modeshape 4.5.0.Final in Wildfly 8.2.2.Final using the Wildfly Kit. I currently have Lucene configured as my Index Provider and a number of index definitions:

       

                      <index-providers>
                          <index-provider name="lucene" classname="lucene" module="org.modeshape.index-provider.lucene" relative-to="jboss.server.data.dir" path="modeshape/indexes/"/>
                      </index-providers>
      
      
      

       

      I am seeing an issue where Modeshape will re-index the entire node structure after a restart even if there have been no changes to repository. This does not happen every time but it does happen fairly frequently is happening every time. The last time I observed this, I had stopped Wildfly and made some changes to the logging sub-system. Upon restarting the server and accessing the repository a full re-index began. No new nodes had been added to the repository between the creating of the first set of indexes and the second set of indexes and index files have not been changed.

       

      The original indexes are still on the file system and a send *.cfs is created with a new set of indexes for index definition e.g.

       

      /opt/wildfly/standalone/data/modeshape/indexes/default/asset_names
      
      drwxr-xr-x  10 rlucas  wheel      340 Jan 26 11:33 .
      drwxr-xr-x  84 rlucas  wheel    2856 Jan 25 19:33 ..
      -rw-r--r--  1 rlucas  wheel      225 Jan 26 08:38 _a66.cfe
      -rw-r--r--  1 rlucas  wheel  1701922 Jan 26 08:38 _a66.cfs
      -rw-r--r--  1 rlucas  wheel      367 Jan 26 08:38 _a66.si
      -rw-r--r--  1 rlucas  wheel      225 Jan 26 11:33 _a67.cfe
      -rw-r--r--  1 rlucas  wheel  1701922 Jan 26 11:33 _a67.cfs
      -rw-r--r--  1 rlucas  wheel      367 Jan 26 11:33 _a67.si
      -rw-r--r--  1 rlucas  wheel      171 Jan 26 11:29 segments_any
      -rw-r--r--  1 rlucas  wheel        0 Jan 25 19:33 write.lock
      
      
      

       

      The biggest problem with this is that the process takes 20-25 minutes to complete during which we can not use the application as the queries need the indexes to be able to execute in a reasonable timeframe.