You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/07/10 05:34:37 UTC
svn commit: r1359468 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/core/SolrCore.java
Author: markrmiller
Date: Tue Jul 10 03:34:37 2012
New Revision: 1359468
URL: http://svn.apache.org/viewvc?rev=1359468&view=rev
Log:
SOLR-3355: fix bug around null shard / collection in statistics
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1359468&r1=1359467&r2=1359468&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/core/SolrCore.java Tue Jul 10 03:34:37 2012
@@ -2006,8 +2006,16 @@ public final class SolrCore implements S
}
CloudDescriptor cloudDesc = cd.getCloudDescriptor();
if (cloudDesc != null) {
- lst.add("collection", cloudDesc.getCollectionName());
- lst.add("shard", cloudDesc.getShardId());
+ String collection = cloudDesc.getCollectionName();
+ if (collection == null) {
+ collection = "_notset_";
+ }
+ lst.add("collection", collection);
+ String shard = cloudDesc.getShardId();
+ if (shard == null) {
+ shard = "_auto_";
+ }
+ lst.add("shard", shard);
}
}