psalagnac commented on code in PR #3416:
URL: https://github.com/apache/solr/pull/3416#discussion_r2221771781


##########
solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java:
##########
@@ -72,23 +71,33 @@ public class SolrIndexWriter extends IndexWriter {
   private Directory directory;
 
   // metrics
-  private long majorMergeDocs = 512 * 1024;
-  private Timer majorMerge;
-  private Timer minorMerge;
-  private Meter majorMergedDocs;
-  private Meter majorDeletedDocs;
-  private Counter mergeErrors;
+  private static final String MERGE_METRIC_PATH_COMPONENT = "merge";
+  private static final String MERGE_METRIC_PATH_COMPONENT_MAJOR = "major";
+  private static final String MERGE_METRIC_PATH_COMPONENT_MINOR = "minor";
+  private static final String MERGE_METRIC_PATH_COMPONENT_FINISHED = 
"finished";
+  private static final String MERGE_METRIC_PATH_COMPONENT_STARTED = "started";
+
+  private static final String MERGES_METRIC_NAME = "merges";
+  private static final String MERGE_DOCS_METRIC_NAME = "docs";
+  private static final String MERGE_DELETED_DOCS_METRIC_NAME = "deletedDocs";
+  private static final String MERGE_SEGMENTS_METRIC_NAME = "segments";
+  private static final String MERGE_TIMES_METRIC_NAME = "mergeTimes";
+  private static final String MERGE_FLUSH_METRIC_NAME = "flushes";
+  private static final String MERGE_ERRORS_METRIC_NAME = "errors";
+
+  private static final Map<String, Counter> majorMergeStartedMetrics = new 
HashMap<>();

Review Comment:
   I'm confused by these static (global) maps. Shouldn't we have per core 
metrics?



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to