Author: nzamosenchuk
Date: 2010-12-17 04:00:38 -0500 (Fri, 17 Dec 2010)
New Revision: 3674
Modified:
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
Log:
EXOJCR-1080 : Avoid Doc's transfer if current JCR-node is RW.
Modified:
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
---
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2010-12-17
08:42:48 UTC (rev 3673)
+++
jcr/branches/1.14-IMPR/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2010-12-17
09:00:38 UTC (rev 3674)
@@ -815,7 +815,8 @@
private void updateInternal(final Collection<String> remove, final
Collection<Document> add) throws IOException
{
- if (rpcService == null)
+ // if RPC not configured or current node is in READ_WRITE mode
+ if (rpcService == null || modeHandler.getMode() == IndexerIoMode.READ_WRITE)
{
index.update(remove, add);
}