-
1. Re: rebuild index on startup defaults and startup times
hchiorean Apr 12, 2013 2:13 AM (in response to bwallis42)Hi Brian,
With the fixes for https://issues.jboss.org/browse/MODE-1872 and https://issues.jboss.org/browse/MODE-1876, re-indexing is performed asynchronously by default and if_missing basically means that re-indexing is only performed if there aren't any indexes at all.
In other words, the entire index tree is no longer walked/read. Its simple presence is enough.
So regarding your questions:
1. Yes, we believe async is the correct setting, because it's more important to have a "responsive" repository ASAP, as opposed to having an unresponsive repository when having to perform re-indexing for lots of nodes.
2. There isn't a way to do this programmatically and also the code which walks the entire index tree has been removed, so I don't know that this would make sense. The reason it was removed is that loading all indexes in memory is a ...bad idea for a real system.
3. Because ModeShape uses just 1 index (with lots of segments), I really doubt it makes a difference, because the update/add index segment jobs would still "bubble down" to the same index writer instance. That being said, we haven't really tested/profiled this, so I can't be 100% sure.
4. Index updates during a transient session, in the case of an active transaction, are sent to Hibernate Search, together with the transaction context. Hibernate Search in turn, will run the index updates only when the transaction has been committed successfully (via a Synchronization listener). In case the transaction is rolled back, or smth. unexpected occurs, the listener won't be fired and no index changes will be performed.