[exo-jcr-commits] exo-jcr SVN: r5568 - in jcr/branches/1.15.x: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Feb 6 07:24:09 EST 2012


Author: tolusha
Date: 2012-02-06 07:24:08 -0500 (Mon, 06 Feb 2012)
New Revision: 5568

Modified:
   jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexInfos.java
   jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
Log:
EXOJCR-1730: Exception when stopping the coordinator in suspended cluster

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java	2012-02-06 12:23:19 UTC (rev 5567)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java	2012-02-06 12:24:08 UTC (rev 5568)
@@ -136,7 +136,10 @@
          // re-read from FS current actual list.
          try
          {
-            super.read();
+            if (!multiIndex.isStopped())
+            {
+               super.read();
+            }
          }
          catch (IOException e)
          {

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexInfos.java	2012-02-06 12:23:19 UTC (rev 5567)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/IndexInfos.java	2012-02-06 12:24:08 UTC (rev 5568)
@@ -76,7 +76,7 @@
    /**
     * {@link MultiIndex} instance for callbacking when list of indexes changed 
     */
-   private MultiIndex multiIndex;
+   protected MultiIndex multiIndex;
 
    /**
     * Creates a new IndexInfos using <code>"indexes"</code> as a filename.

Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java	2012-02-06 12:23:19 UTC (rev 5567)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java	2012-02-06 12:24:08 UTC (rev 5568)
@@ -3372,6 +3372,14 @@
    }
 
    /**
+    * @return true if index is stopped. 
+    */
+   public boolean isStopped()
+   {
+      return stopped;
+   }
+
+   /**
     * Switches index mode
     * 
     * @param isOnline

Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java	2012-02-06 12:23:19 UTC (rev 5567)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexInfos.java	2012-02-06 12:24:08 UTC (rev 5568)
@@ -166,7 +166,10 @@
          // re-read from FS current actual list.
          try
          {
-            super.read();
+            if (!multiIndex.isStopped())
+            {
+               super.read();
+            }
          }
          catch (IOException e)
          {



More information about the exo-jcr-commits mailing list