mirror of https://github.com/apache/lucene.git
SOLR-6650: disabled by default
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1634621 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfad0ad2f9
commit
14d27294e9
|
@ -241,7 +241,7 @@ public class SolrConfig extends Config {
|
|||
jmxConfig = new JmxConfiguration(false, null, null, null);
|
||||
}
|
||||
maxWarmingSearchers = getInt("query/maxWarmingSearchers",Integer.MAX_VALUE);
|
||||
slowQueryThresholdMillis = getInt("query/slowQueryThresholdMillis", 1000);
|
||||
slowQueryThresholdMillis = getInt("query/slowQueryThresholdMillis", -1);
|
||||
|
||||
loadPluginInfo(SolrRequestHandler.class,"requestHandler",
|
||||
REQUIRE_NAME, REQUIRE_CLASS, MULTI_OK);
|
||||
|
|
|
@ -666,7 +666,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
|||
this.solrConfig = null;
|
||||
this.startTime = System.currentTimeMillis();
|
||||
this.maxWarmingSearchers = 2; // we don't have a config yet, just pick a number.
|
||||
this.slowQueryThresholdMillis = 1000;
|
||||
this.slowQueryThresholdMillis = -1;
|
||||
this.resourceLoader = null;
|
||||
this.updateHandler = null;
|
||||
this.isReloaded = true;
|
||||
|
@ -1989,10 +1989,12 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
|||
if (rsp.getToLog().size() > 0) {
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info(rsp.getToLogAsString(logid));
|
||||
} else if (log.isWarnEnabled()) {
|
||||
}
|
||||
|
||||
if (log.isWarnEnabled()) {
|
||||
final int qtime = (int)(rsp.getEndTime() - req.getStartTime());
|
||||
if (qtime >= slowQueryThresholdMillis) {
|
||||
log.warn(rsp.getToLogAsString(logid));
|
||||
if (slowQueryThresholdMillis >= 0 && qtime >= slowQueryThresholdMillis) {
|
||||
log.warn("slow: " + rsp.getToLogAsString(logid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
|
|||
public class LogUpdateProcessorFactory extends UpdateRequestProcessorFactory implements UpdateRequestProcessorFactory.RunAlways {
|
||||
|
||||
int maxNumToLog = 10;
|
||||
int slowUpdateThresholdMillis = 1000;
|
||||
int slowUpdateThresholdMillis = -1;
|
||||
@Override
|
||||
public void init( final NamedList args ) {
|
||||
if( args != null ) {
|
||||
|
@ -186,10 +186,12 @@ class LogUpdateProcessor extends UpdateRequestProcessor {
|
|||
|
||||
if (log.isInfoEnabled()) {
|
||||
log.info(getLogStringAndClearRspToLog());
|
||||
} else if (log.isWarnEnabled()) {
|
||||
}
|
||||
|
||||
if (log.isWarnEnabled()) {
|
||||
long elapsed = rsp.getEndTime() - req.getStartTime();
|
||||
if (elapsed >= slowUpdateThresholdMillis) {
|
||||
log.warn(getLogStringAndClearRspToLog());
|
||||
if (slowUpdateThresholdMillis >= 0 && elapsed >= slowUpdateThresholdMillis) {
|
||||
log.warn("slow: " + getLogStringAndClearRspToLog());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -489,12 +489,8 @@
|
|||
useful to be able to set a latency threshold above which a request
|
||||
is considered "slow" and log that request at WARN level so we can
|
||||
easily identify slow queries.
|
||||
|
||||
This setting only applies if the logger for the
|
||||
org.apache.solr.core.SolrCore is set to WARN or greater.
|
||||
|
||||
-->
|
||||
<slowQueryThresholdMillis>1000</slowQueryThresholdMillis>
|
||||
<slowQueryThresholdMillis>-1</slowQueryThresholdMillis>
|
||||
|
||||
|
||||
<!-- Solr Internal Query Caches
|
||||
|
|
Loading…
Reference in New Issue