mirror of https://github.com/apache/lucene.git
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr
This commit is contained in:
commit
913a2c4345
|
@ -250,14 +250,11 @@ public class LongValueFacetCounts extends Facets {
|
|||
}
|
||||
|
||||
private void increment(long value) {
|
||||
/*
|
||||
if (value >= 0 && value < counts.length) {
|
||||
counts[(int) value]++;
|
||||
} else {
|
||||
hashCounts.add(value, 1);
|
||||
}
|
||||
*/
|
||||
hashCounts.add(value, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -365,22 +362,18 @@ public class LongValueFacetCounts extends Facets {
|
|||
|
||||
boolean countsAdded = false;
|
||||
for (int i = 0; i < upto; i++) {
|
||||
/*
|
||||
if (countsAdded == false && hashCounts.values[i] >= counts.length) {
|
||||
countsAdded = true;
|
||||
appendCounts(labelValues);
|
||||
}
|
||||
*/
|
||||
|
||||
labelValues.add(new LabelAndValue(Long.toString(hashCounts.values[i]),
|
||||
hashCounts.counts[i]));
|
||||
}
|
||||
|
||||
/*
|
||||
if (countsAdded == false) {
|
||||
appendCounts(labelValues);
|
||||
}
|
||||
*/
|
||||
|
||||
return new FacetResult(field, new String[0], totCount, labelValues.toArray(new LabelAndValue[0]), labelValues.size());
|
||||
}
|
||||
|
|
|
@ -114,6 +114,8 @@ Bug Fixes
|
|||
contrib/ltr OriginalScoreFeature issues in SolrCloud mode.
|
||||
(Yuki Yano, Jonathan Gonzalez, Ryan Yacyshyn, Christine Poerschke)
|
||||
|
||||
* SOLR-11278: Stopping CDCR should cancel a running bootstrap operation. (Amrit Sarkar, shalin)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
@ -467,6 +469,8 @@ New Features
|
|||
* SOLR-9910: Add solr/solr.cmd parameter to append jetty parameters to the start script.
|
||||
(Mano Kovacs via Mark Miller)
|
||||
|
||||
* SOLR-6671: Possible to set solr.data.home property as root dir for all data (janhoy, Shawn Heisey, Mark Miller)
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
* SOLR-9262: Connection and read timeouts are being ignored by UpdateShardHandler after SOLR-4509.
|
||||
|
@ -1351,8 +1355,6 @@ New Features
|
|||
parsers' behavior remains the same: queries will be split on whitespace before sending individual terms to analysis.
|
||||
(Steve Rowe)
|
||||
|
||||
* SOLR-6671: Possible to set solr.data.home property as root dir for all data (janhoy, Shawn Heisey, Mark Miller)
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -142,6 +143,11 @@ class CdcrReplicatorManager implements CdcrStateManager.CdcrStateObserver {
|
|||
ExecutorUtil.shutdownAndAwaitTermination(bootstrapExecutor);
|
||||
}
|
||||
this.closeLogReaders();
|
||||
Callable callable = core.getSolrCoreState().getCdcrBootstrapCallable();
|
||||
if (callable != null) {
|
||||
CdcrRequestHandler.BootstrapCallable bootstrapCallable = (CdcrRequestHandler.BootstrapCallable) callable;
|
||||
IOUtils.closeQuietly(bootstrapCallable);
|
||||
}
|
||||
}
|
||||
|
||||
List<CdcrReplicatorState> getReplicatorStates() {
|
||||
|
|
|
@ -713,7 +713,7 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
|
|||
}
|
||||
}
|
||||
|
||||
private static class BootstrapCallable implements Callable<Boolean>, Closeable {
|
||||
static class BootstrapCallable implements Callable<Boolean>, Closeable {
|
||||
private final String masterUrl;
|
||||
private final SolrCore core;
|
||||
private volatile boolean closed = false;
|
||||
|
|
|
@ -18,18 +18,10 @@ package org.apache.solr.metrics.reporters;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.SortedMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.codahale.metrics.Counter;
|
||||
import com.codahale.metrics.Gauge;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import com.codahale.metrics.Meter;
|
||||
import com.codahale.metrics.MetricFilter;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import com.codahale.metrics.Slf4jReporter;
|
||||
|
||||
import com.codahale.metrics.Timer;
|
||||
import org.apache.solr.metrics.FilteringSolrMetricReporter;
|
||||
import org.apache.solr.metrics.SolrMetricManager;
|
||||
import org.slf4j.Logger;
|
||||
|
|
|
@ -112,4 +112,18 @@ public final class StartupLoggingUtils {
|
|||
log.warn("{} Dynamic log manipulation currently only supported for Log4j. "
|
||||
+ "Please consult your logging framework of choice on how to configure the appropriate logging.", msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a string representing the current static ROOT logging level
|
||||
* @return a string TRACE, DEBUG, WARN, ERROR or INFO representing current log level. Default is INFO
|
||||
*/
|
||||
public static String getLogLevelString() {
|
||||
final Logger rootLogger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
|
||||
if (rootLogger.isTraceEnabled()) return "TRACE";
|
||||
else if (rootLogger.isDebugEnabled()) return "DEBUG";
|
||||
else if (rootLogger.isInfoEnabled()) return "INFO";
|
||||
else if (rootLogger.isWarnEnabled()) return "WARN";
|
||||
else if (rootLogger.isErrorEnabled()) return "ERROR";
|
||||
else return "INFO";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import java.util.Properties;
|
|||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||
import org.apache.solr.JSONTestUtil;
|
||||
|
|
|
@ -122,6 +122,7 @@ import org.apache.solr.util.RandomizeSSL.SSLRandomizer;
|
|||
import org.apache.solr.util.RefCounted;
|
||||
import org.apache.solr.util.RevertDefaultThreadHandlerRule;
|
||||
import org.apache.solr.util.SSLTestConfig;
|
||||
import org.apache.solr.util.StartupLoggingUtils;
|
||||
import org.apache.solr.util.TestHarness;
|
||||
import org.apache.solr.util.TestInjection;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
|
@ -180,6 +181,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
|
||||
public static int DEFAULT_CONNECTION_TIMEOUT = 60000; // default socket connection timeout in ms
|
||||
|
||||
private static String initialRootLogLevel;
|
||||
|
||||
protected void writeCoreProperties(Path coreDirectory, String corename) throws IOException {
|
||||
Properties props = new Properties();
|
||||
props.setProperty("name", corename);
|
||||
|
@ -251,7 +254,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
|
||||
@BeforeClass
|
||||
public static void setupTestCases() {
|
||||
|
||||
initialRootLogLevel = StartupLoggingUtils.getLogLevelString();
|
||||
initClassLogLevels();
|
||||
|
||||
initCoreDataDir = createTempDir("init-core-data").toFile();
|
||||
|
@ -321,6 +324,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
|
||||
LogLevel.Configurer.restoreLogLevels(savedClassLogLevels);
|
||||
savedClassLogLevels.clear();
|
||||
StartupLoggingUtils.changeLogLevel(initialRootLogLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue