You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/10/12 10:46:04 UTC
[GitHub] [lucene-solr] noblepaul opened a new pull request #1974: SOLR-14914: Add option to disable metrics collection
noblepaul opened a new pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] madrob closed pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
madrob closed pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] muse-dev[bot] commented on a change in pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
muse-dev[bot] commented on a change in pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#discussion_r503255143
##########
File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
##########
@@ -110,19 +110,22 @@
public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60;
- private MetricRegistry.MetricSupplier<Counter> counterSupplier;
- private MetricRegistry.MetricSupplier<Meter> meterSupplier;
- private MetricRegistry.MetricSupplier<Timer> timerSupplier;
- private MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
+ private final MetricsConfig metricsConfig;
+ private final MetricRegistry.MetricSupplier<Counter> counterSupplier;
+ private final MetricRegistry.MetricSupplier<Meter> meterSupplier;
+ private final MetricRegistry.MetricSupplier<Timer> timerSupplier;
+ private final MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
public SolrMetricManager() {
+ metricsConfig = new MetricsConfig.MetricsConfigBuilder().build();
counterSupplier = MetricSuppliers.counterSupplier(null, null);
meterSupplier = MetricSuppliers.meterSupplier(null, null);
Review comment:
*NULL_DEREFERENCE:* object `null` is dereferenced by call to `meterSupplier(...)` at line 122.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] sigram commented on a change in pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
sigram commented on a change in pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#discussion_r504781919
##########
File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
##########
@@ -110,19 +110,22 @@
public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60;
- private MetricRegistry.MetricSupplier<Counter> counterSupplier;
- private MetricRegistry.MetricSupplier<Meter> meterSupplier;
- private MetricRegistry.MetricSupplier<Timer> timerSupplier;
- private MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
+ private final MetricsConfig metricsConfig;
+ private final MetricRegistry.MetricSupplier<Counter> counterSupplier;
+ private final MetricRegistry.MetricSupplier<Meter> meterSupplier;
+ private final MetricRegistry.MetricSupplier<Timer> timerSupplier;
+ private final MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
public SolrMetricManager() {
+ metricsConfig = new MetricsConfig.MetricsConfigBuilder().build();
counterSupplier = MetricSuppliers.counterSupplier(null, null);
meterSupplier = MetricSuppliers.meterSupplier(null, null);
Review comment:
@madrob well spotted, though the message is somewhat misleading. I'll fix this in `MetricSuppliers`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] madrob commented on a change in pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#discussion_r504767202
##########
File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
##########
@@ -110,19 +110,22 @@
public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60;
- private MetricRegistry.MetricSupplier<Counter> counterSupplier;
- private MetricRegistry.MetricSupplier<Meter> meterSupplier;
- private MetricRegistry.MetricSupplier<Timer> timerSupplier;
- private MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
+ private final MetricsConfig metricsConfig;
+ private final MetricRegistry.MetricSupplier<Counter> counterSupplier;
+ private final MetricRegistry.MetricSupplier<Meter> meterSupplier;
+ private final MetricRegistry.MetricSupplier<Timer> timerSupplier;
+ private final MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
public SolrMetricManager() {
+ metricsConfig = new MetricsConfig.MetricsConfigBuilder().build();
counterSupplier = MetricSuppliers.counterSupplier(null, null);
meterSupplier = MetricSuppliers.meterSupplier(null, null);
Review comment:
(But it is still wrong in this case)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] madrob commented on a change in pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#discussion_r504766830
##########
File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
##########
@@ -110,19 +110,22 @@
public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60;
- private MetricRegistry.MetricSupplier<Counter> counterSupplier;
- private MetricRegistry.MetricSupplier<Meter> meterSupplier;
- private MetricRegistry.MetricSupplier<Timer> timerSupplier;
- private MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
+ private final MetricsConfig metricsConfig;
+ private final MetricRegistry.MetricSupplier<Counter> counterSupplier;
+ private final MetricRegistry.MetricSupplier<Meter> meterSupplier;
+ private final MetricRegistry.MetricSupplier<Timer> timerSupplier;
+ private final MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
public SolrMetricManager() {
+ metricsConfig = new MetricsConfig.MetricsConfigBuilder().build();
counterSupplier = MetricSuppliers.counterSupplier(null, null);
meterSupplier = MetricSuppliers.meterSupplier(null, null);
Review comment:
@Muse-Dev is not _obviously_ wrong, because there is a path where if info is not null, but loader is, then we get an NPE.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] sigram commented on a change in pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
sigram commented on a change in pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#discussion_r503358068
##########
File path: solr/core/src/java/org/apache/solr/metrics/SolrMetricManager.java
##########
@@ -110,19 +110,22 @@
public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60;
- private MetricRegistry.MetricSupplier<Counter> counterSupplier;
- private MetricRegistry.MetricSupplier<Meter> meterSupplier;
- private MetricRegistry.MetricSupplier<Timer> timerSupplier;
- private MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
+ private final MetricsConfig metricsConfig;
+ private final MetricRegistry.MetricSupplier<Counter> counterSupplier;
+ private final MetricRegistry.MetricSupplier<Meter> meterSupplier;
+ private final MetricRegistry.MetricSupplier<Timer> timerSupplier;
+ private final MetricRegistry.MetricSupplier<Histogram> histogramSupplier;
public SolrMetricManager() {
+ metricsConfig = new MetricsConfig.MetricsConfigBuilder().build();
counterSupplier = MetricSuppliers.counterSupplier(null, null);
meterSupplier = MetricSuppliers.meterSupplier(null, null);
Review comment:
@muse-dev is obviously wrong, this can never be null as it's a static method, and it accepts null args.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
[GitHub] [lucene-solr] sigram commented on pull request #1974: SOLR-14914: Add option to disable metrics collection
Posted by GitBox <gi...@apache.org>.
sigram commented on pull request #1974:
URL: https://github.com/apache/lucene-solr/pull/1974#issuecomment-712191017
This has been merged - @noblepaul , can you please close it? Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org