Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions solr/core/src/java/org/apache/solr/cloud/SolrZkServer.java

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a simplification here. Both sides of the if were the same! No doubt after some previous change.

Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,11 @@ public void start() {
},
"embeddedZkServer");

if (zkProps.getServers().size() > 1) {
if (log.isInfoEnabled()) {
log.info(
"STARTING EMBEDDED ENSEMBLE ZOOKEEPER SERVER at port {}, listening on host {}",
zkProps.getClientPortAddress().getPort(),
zkProps.getClientPortAddress().getAddress().getHostAddress());
}
} else {
if (log.isInfoEnabled()) {
log.info(
"STARTING EMBEDDED ENSEMBLE ZOOKEEPER SERVER at port {}, listening on host {}",
zkProps.getClientPortAddress().getPort(),
zkProps.getClientPortAddress().getAddress().getHostAddress());
}
if (log.isInfoEnabled()) {
log.info(
"STARTING EMBEDDED ENSEMBLE ZOOKEEPER SERVER at {}:{}",
zkProps.getClientPortAddress().getAddress().getHostAddress(),
zkProps.getClientPortAddress().getPort());
}

zkThread.setDaemon(true);
Expand Down
4 changes: 3 additions & 1 deletion solr/core/src/java/org/apache/solr/core/SolrConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ private SolrConfig(SolrResourceLoader loader, String name, Properties substituta
.txt();

luceneMatchVersion = SolrConfig.parseLuceneVersionString(val);
log.info("Using Lucene MatchVersion: {}", luceneMatchVersion);
if (!luceneMatchVersion.equals(Version.LATEST)) {
log.info("Using Lucene MatchVersion: {}", luceneMatchVersion);
}

String indexConfigPrefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ synchronized void addToClassLoader(List<URL> urls) {

if (log.isInfoEnabled()) {
log.info(
"Added {} libs to classloader, from paths: {}",
urls.size(),
"Added lib dirs to classloader: {}",
urls.stream()
.map(u -> u.getPath().substring(0, u.getPath().lastIndexOf('/')))
.sorted()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ public class SolrRequestAuthorizer implements ContainerRequestFilter {

@Context private ResourceInfo resourceInfo;

public SolrRequestAuthorizer() {
log.info("Creating a new SolrRequestAuthorizer");
}

@SuppressWarnings("unchecked")
@Override
public void filter(ContainerRequestContext requestContext) throws IOException {
Expand Down

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public static boolean isJvmMetricsEnabled() {
+ " gauges; guarded by instanceof check so gracefully absent on non-HotSpot JVMs")
public OtelRuntimeJvmMetrics initialize(
SolrMetricManager solrMetricManager, String registryName) {
if (!isJvmMetricsEnabled()) return this;
if (!isJvmMetricsEnabled()) {
log.info("JVM metrics are disabled"); // log because this isn't a default
return this;
}

// a dummy instance; we only care to provide the MeterProvider
var otel =
Expand Down Expand Up @@ -93,16 +96,13 @@ public ContextPropagators getPropagators() {
if (free >= 0) measurement.record(free, Attributes.of(STATE_KEY_ATTR, "free"));
},
OtelUnit.BYTES);
log.info("Physical memory metrics enabled");
log.debug("Physical memory metrics enabled");
} else {
if (log.isDebugEnabled()) {
log.debug(
"Physical memory metrics unavailable:"
+ " com.sun.management.OperatingSystemMXBean not present on this JVM");
}
log.info(
"Physical memory metrics unavailable:"
+ " com.sun.management.OperatingSystemMXBean not present on this JVM");
}
isInitialized = true;
log.info("JVM metrics collection successfully initialized");
return this;
}

Expand Down
13 changes: 0 additions & 13 deletions solr/core/src/java/org/apache/solr/schema/IndexSchema.java

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seemed totally uninteresting to me

Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,6 @@ protected void readSchema(ConfigSetService.ConfigResource is) {
try {
rootNode = is.get();
name = rootNode.attributes().get("name");
StringBuilder sb = new StringBuilder();
// Another case where the initialization from the test harness is different than the "real
// world"
if (name == null) {
sb.append("schema has no name!");
log.warn("{}", sb);
} else {
sb.append("Schema ");
sb.append(NAME);
sb.append("=");
sb.append(name);
log.info("{}", sb);
}

version = Float.parseFloat(rootNode.attributes().getOrDefault("version", "1.0f"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public String init(NamedList<?> config, SolrCore core) {

SolrParams params = config.toSolrParams();

log.info("init: {}", config);
log.debug("init: {}", config);
String name = super.init(config, core);

Comparator<SuggestWord> comp = SuggestWordQueue.DEFAULT_COMPARATOR;
Expand Down
4 changes: 2 additions & 2 deletions solr/core/src/java/org/apache/solr/update/UpdateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public UpdateHandler(SolrCore core, UpdateLog updateLog, boolean initUlog) {
? dirFactory.newDefaultUpdateLog()
: core.getResourceLoader().newInstance(ulogPluginInfo, UpdateLog.class, true);

if (log.isInfoEnabled()) {
log.info("Using UpdateLog implementation: {}", ulog.getClass().getName());
if (log.isDebugEnabled()) {
log.debug("Using UpdateLog implementation: {}", ulog.getClass().getName());
}
ulog.init(ulogPluginInfo);

Expand Down
14 changes: 5 additions & 9 deletions solr/server/solr/configsets/_default/conf/solrconfig.xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By commenting out the whole listener, it's never loaded and thus doesn't log

Original file line number Diff line number Diff line change
Expand Up @@ -476,23 +476,19 @@
<!-- QuerySenderListener takes an array of NamedList and executes a
local query request for each NamedList in sequence.
-->
<!--
<listener event="newSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<!--
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
-->
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
</arr>
</listener>
<listener event="firstSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<!--
<lst>
<str name="q">static firstSearcher warming in solrconfig.xml</str>
</lst>
-->
<lst><str name="q">static firstSearcher warming in solrconfig.xml</str></lst>
</arr>
</listener>
-->

<!-- Use Cold Searcher

Expand Down
3 changes: 3 additions & 0 deletions solr/server/solr/zoo.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ syncLimit=5
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

# 0 is ZK's default, means unlimited
maxCnxns=0
Comment on lines +35 to +36

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZK classes observed this was not set and logged that we didn't set it. Oooookaaaay.


# Disable ZK AdminServer since we do not use it
admin.enableServer=false
Loading