[exo-jcr-commits] exo-jcr SVN: r3973 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Feb 15 03:29:11 EST 2011
Author: areshetnyak
Date: 2011-02-15 03:29:10 -0500 (Tue, 15 Feb 2011)
New Revision: 3973
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
Log:
EXOJCR-1188 : The patch was checked. IndexInfos.write() was called just after replaceIndexes operation done by IndexMerger.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-02-12 09:47:06 UTC (rev 3972)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-02-15 08:29:10 UTC (rev 3973)
@@ -876,6 +876,13 @@
// when reindexing the final commit is done at the very end
executeAndLog(new Commit(getTransactionId()));
}
+ // force IndexInfos (IndexNames) to be written on FS and both be replicated over cluster
+ // for non-coordinator cluster nodes be notified of new index list ASAP. This may avoid race
+ // conditions when coordinator invokes flush() which performs indexNames.write()
+ // and deletes obsolete index just after. Making this list be written now, will notify non-
+ // coordinator node about new merged index and obsolete indexes long time before they will
+ // be deleted.
+ indexNames.write();
}
finally
{
More information about the exo-jcr-commits
mailing list