lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1210763 - in /lucene/dev/branches/solrcloud/solr/core/src: java/org/apache/solr/update/SolrCmdDistributor.java java/org/apache/solr/update/processor/DistributedUpdateProcessor.java test/org/apache/solr/cloud/BasicZkTest.java
Date Tue, 06 Dec 2011 03:11:26 GMT
Author: markrmiller
Date: Tue Dec  6 03:11:26 2011
New Revision: 1210763

URL: http://svn.apache.org/viewvc?rev=1210763&view=rev
Log:
stop going though http for local updates and re-enable BasicZkTest

Modified:
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
    lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java

Modified: lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java?rev=1210763&r1=1210762&r2=1210763&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
(original)
+++ lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
Tue Dec  6 03:11:26 2011
@@ -376,8 +376,7 @@ public class SolrCmdDistributor {
     }
     
     // nocommit: just for kicks at the moment...
-    if (failed <= (expectedResponses / 2)) {
-      // don't fail if half or more where fine
+    if (failed <= (expectedResponses / 2) - 1) {
       rsp.setException(null);
     }
   }

Modified: lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1210763&r1=1210762&r2=1210763&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
(original)
+++ lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
Tue Dec  6 03:11:26 2011
@@ -25,7 +25,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
-import org.apache.commons.lang.NullArgumentException;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.CharsRef;
 import org.apache.solr.cloud.HashPartitioner;
@@ -269,14 +268,12 @@ public class DistributedUpdateProcessor 
 
   // must be synchronized by bucket
   private void doLocalAdd(AddUpdateCommand cmd) throws IOException {
-    if (shards == null)   // TODO: temporary. a distrib update currently goes through HTTP
for self
-      super.processAdd(cmd);
+    super.processAdd(cmd);
   }
 
   // must be synchronized by bucket
   private void doLocalDelete(DeleteUpdateCommand cmd) throws IOException {
-    if (shards == null)   // TODO: temporary. a distrib update currently goes through HTTP
for self
-      super.processDelete(cmd);
+    super.processDelete(cmd);
   }
 
   /**
@@ -613,13 +610,13 @@ public class DistributedUpdateProcessor 
 
     for (Entry<String,ZkNodeProps> entry : shardMap.entrySet()) {
       if (cloudState.liveNodesContain(entry.getValue().get(
-          ZkStateReader.NODE_NAME_PROP))) {
+          ZkStateReader.NODE_NAME_PROP)) && !entry.getKey().equals(shardZkNodeName))
{
         String replicaUrl = entry.getValue().get(ZkStateReader.URL_PROP);
         urls.add(replicaUrl);
       }
     }
     if (urls.size() == 0) {
-      throw new ZooKeeperException(ErrorCode.SERVICE_UNAVAILABLE, "No available servers hosting
shard " + shardId + " found");
+      return null;
     }
     return urls;
   }

Modified: lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java?rev=1210763&r1=1210762&r2=1210763&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
(original)
+++ lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/BasicZkTest.java
Tue Dec  6 03:11:26 2011
@@ -25,14 +25,12 @@ import org.apache.solr.core.SolrCore;
 import org.apache.solr.update.DirectUpdateHandler2;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.xml.sax.SAXParseException;
 
 /**
  *
  */
-@Ignore("TODO: BasicZkTest is no longer compatible with the new solrcloud")
 public class BasicZkTest extends AbstractZkTestCase {
   
   @BeforeClass



Mime
View raw message