You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/01/24 21:51:17 UTC
svn commit: r1438183 [1/3] - in /lucene/dev/branches/lucene4547: ./ lucene/
lucene/core/ solr/ solr/core/ solr/core/src/java/org/apache/solr/cloud/
solr/core/src/test/org/apache/solr/cloud/ solr/example/
solr/example/solr/collection1/conf/ solr/webapp/...
Author: rmuir
Date: Thu Jan 24 20:51:17 2013
New Revision: 1438183
URL: http://svn.apache.org/viewvc?rev=1438183&view=rev
Log:
Merged /lucene/dev/trunk:r1437978-1438170
Modified:
lucene/dev/branches/lucene4547/ (props changed)
lucene/dev/branches/lucene4547/lucene/ (props changed)
lucene/dev/branches/lucene4547/lucene/core/ (props changed)
lucene/dev/branches/lucene4547/solr/ (props changed)
lucene/dev/branches/lucene4547/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/lucene4547/solr/core/ (props changed)
lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
lucene/dev/branches/lucene4547/solr/example/ (props changed)
lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml
lucene/dev/branches/lucene4547/solr/webapp/ (props changed)
lucene/dev/branches/lucene4547/solr/webapp/web/js/lib/jquery.sparkline.js
lucene/dev/branches/lucene4547/solr/webapp/web/js/scripts/query.js
Modified: lucene/dev/branches/lucene4547/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/CHANGES.txt?rev=1438183&r1=1438182&r2=1438183&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene4547/solr/CHANGES.txt Thu Jan 24 20:51:17 2013
@@ -70,6 +70,15 @@ Bug Fixes
* SOLR-4330: group.sort is ignored when using group.truncate and ex/tag
local params together (koji)
+
+* SOLR-4321: Collections API will sometimes use a node more than once, even
+ when more unused nodes are available.
+ (Eric Falcao, Brett Hoerner, Mark Miller)
+
+* SOLR-4345 : Solr Admin UI dosent work in IE 10 (steffkes)
+
+* SOLR-4349 : Admin UI - Query Interface does not work in IE
+ (steffkes)
Optimizations
----------------------
@@ -88,7 +97,8 @@ Optimizations
Other Changes
----------------------
-
+* SOLR-4348: Make the lock type configurable by system property by default.
+ (Mark Miller)
================== 4.1.0 ==================
Modified: lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java?rev=1438183&r1=1438182&r2=1438183&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java Thu Jan 24 20:51:17 2013
@@ -250,7 +250,7 @@ public class OverseerCollectionProcessor
for (int i = 1; i <= numSlices; i++) {
for (int j = 1; j <= repFactor; j++) {
- String nodeName = nodeList.get(((i - 1) + (j - 1)) % nodeList.size());
+ String nodeName = nodeList.get((repFactor * (i - 1) + (j - 1)) % nodeList.size());
String sliceName = "shard" + i;
String shardName = collectionName + "_" + sliceName + "_replica" + j;
log.info("Creating shard " + shardName + " as part of slice "
Modified: lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java?rev=1438183&r1=1438182&r2=1438183&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java (original)
+++ lucene/dev/branches/lucene4547/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java Thu Jan 24 20:51:17 2013
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.net.MalformedURLException;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -148,7 +149,8 @@ public class CollectionsAPIDistributedZk
// would be better if these where all separate tests - but much, much
// slower
-
+
+ testNodesUsedByCreate();
testCollectionsAPI();
// Thread.sleep(10000000000L);
@@ -157,6 +159,51 @@ public class CollectionsAPIDistributedZk
}
}
+ private void testNodesUsedByCreate() throws Exception {
+ // we can use this client because we just want base url
+ final String baseUrl = ((HttpSolrServer) clients.get(0)).getBaseURL().substring(
+ 0,
+ ((HttpSolrServer) clients.get(0)).getBaseURL().length()
+ - DEFAULT_COLLECTION.length() - 1);
+
+ ModifiableSolrParams params = new ModifiableSolrParams();
+ params.set("action", CollectionAction.CREATE.toString());
+
+ params.set("numShards", 2);
+ params.set(OverseerCollectionProcessor.REPLICATION_FACTOR, 2);
+ String collectionName = "nodes_used_collection";
+
+ params.set("name", collectionName);
+ QueryRequest request = new QueryRequest(params);
+ request.setPath("/admin/collections");
+ createNewSolrServer("", baseUrl).request(request);
+
+ List<Integer> numShardsNumReplicaList = new ArrayList<Integer>();
+ numShardsNumReplicaList.add(2);
+ numShardsNumReplicaList.add(2);
+ checkForCollection("nodes_used_collection", numShardsNumReplicaList , null);
+
+ List<String> createNodeList = new ArrayList<String>();
+
+ Set<String> liveNodes = cloudClient.getZkStateReader().getClusterState()
+ .getLiveNodes();
+
+ for (String node : liveNodes) {
+ createNodeList.add(node);
+ }
+
+ DocCollection col = cloudClient.getZkStateReader().getClusterState().getCollection("nodes_used_collection");
+ Collection<Slice> slices = col.getSlices();
+ for (Slice slice : slices) {
+ Collection<Replica> replicas = slice.getReplicas();
+ for (Replica replica : replicas) {
+ createNodeList.remove(replica.getNodeName());
+ }
+ }
+ assertEquals(createNodeList.toString(), 1, createNodeList.size());
+
+ }
+
private void testCollectionsAPI() throws Exception {
// TODO: fragile - because we dont pass collection.confName, it will only
Modified: lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml?rev=1438183&r1=1438182&r2=1438183&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene4547/solr/example/solr/collection1/conf/solrconfig.xml Thu Jan 24 20:51:17 2013
@@ -211,7 +211,7 @@
More details on the nuances of each LockFactory...
http://wiki.apache.org/lucene-java/AvailableLockFactories
-->
- <!-- <lockType>native</lockType> -->
+ <lockType>${solr.lock.type:native}</lockType>
<!-- Unlock On Startup