lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r554189 - in /lucene/java/trunk/contrib/gdata-server/src/core/src: java/org/apache/lucene/gdata/search/index/GDataIndexer.java test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java
Date Sat, 07 Jul 2007 12:28:05 GMT
Author: mikemccand
Date: Sat Jul  7 05:28:04 2007
New Revision: 554189

URL: http://svn.apache.org/viewvc?view=rev&rev=554189
Log:
LUCENE-952: force synchronized access to writer instance variable to fix infinite spin loop
in TestGdataIndexer

Modified:
    lucene/java/trunk/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/search/index/GDataIndexer.java
    lucene/java/trunk/contrib/gdata-server/src/core/src/test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java

Modified: lucene/java/trunk/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/search/index/GDataIndexer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/search/index/GDataIndexer.java?view=diff&rev=554189&r1=554188&r2=554189
==============================================================================
--- lucene/java/trunk/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/search/index/GDataIndexer.java
(original)
+++ lucene/java/trunk/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/search/index/GDataIndexer.java
Sat Jul  7 05:28:04 2007
@@ -400,6 +400,11 @@
 
     }
 
+    // Used only for testing
+    protected synchronized IndexWriter getWriter() {
+      return this.writer;
+    }
+
     /**
      * This factory method creates a new GDataIndexer using a instance of
      * {@link IndexTask}

Modified: lucene/java/trunk/contrib/gdata-server/src/core/src/test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/gdata-server/src/core/src/test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java?view=diff&rev=554189&r1=554188&r2=554189
==============================================================================
--- lucene/java/trunk/contrib/gdata-server/src/core/src/test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java
(original)
+++ lucene/java/trunk/contrib/gdata-server/src/core/src/test/org/apache/lucene/gdata/search/index/TestGdataIndexer.java
Sat Jul  7 05:28:04 2007
@@ -552,7 +552,7 @@
         latch.countDown();
         documentLatch.await(5000,TimeUnit.MILLISECONDS);
         // wait active for the commit
-        while(this.indexer.writer != null){}
+        while(this.indexer.getWriter() != null){}
         
         IndexSearcher s = new IndexSearcher(this.dir);
         Hits h = s.search(new TermQuery(delTerm));



Mime
View raw message