[Mulgara-dev] [Mulgara-svn] r1779 - trunk/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene

Paul Gearon gearon at ieee.org
Thu Aug 20 11:29:34 UTC 2009


On Thu, Aug 20, 2009 at 6:15 AM, Paul Gearon<gearon at ieee.org> wrote:
> On Thu, Aug 20, 2009 at 1:08 AM, Life is hard, and then you
> die<ronald at innovation.ch> wrote:
>> [snip]
>>>      protected void doStart(LuceneTxInfo tx, int flags, boolean isNew) {
>>>        currentIndexes.set(tx.indexes);
>>> +      boolean newIndexReference = resolver.indexes == null;
>>>        resolver.indexes = tx.indexes.values();
>>> +      if (newIndexReference) {
>>> +        try {
>>> +          for (FullTextStringIndex index: resolver.indexes) index.optimize();
>>> +        } catch (FullTextStringIndexException e) {
>>> +          logger.error("Unable to optimize the Lucene indexes", e);
>>> +        }
>>> +      }
>>
>> I don't get this: Why are you doing an optimize on every transaction
>> start rather than at commit time?

BTW, does this mean that the resolver's indexes are null every time
you start a transaction? Because that condition was guarding the call
to optimize().

Paul



More information about the Mulgara-dev mailing list