Re: [PR] SOLR-17648: multiThreaded=true: changed queue implementation [solr]

2025-02-07 Thread via GitHub


dsmiley merged PR #3155:
URL: https://github.com/apache/solr/pull/3155


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



[jira] [Commented] (SOLR-17648) multiThreaded: Remove obsolete RejectedExecutionException avoidance

2025-02-07 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-17648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17925155#comment-17925155
 ] 

ASF subversion and git services commented on SOLR-17648:


Commit 861a7761707457a65a3736ecc274cff3c8cb56e5 in solr's branch 
refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=861a7761707 ]

SOLR-17648: multiThreaded=true: changed queue implementation (#3155)

from unlimited to 1000 max, after which the caller thread will execute.
Didn't need the RejectedExecutionException avoidance hack anymore; Lucene 9.12 
has it.
Configurable size: solr.search.multiThreaded.queueSize

> multiThreaded: Remove obsolete RejectedExecutionException avoidance
> ---
>
> Key: SOLR-17648
> URL: https://issues.apache.org/jira/browse/SOLR-17648
> Project: Solr
>  Issue Type: Task
>Reporter: David Smiley
>Assignee: David Smiley
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Lucene 9.12 fixed a RejectedExecutionException risk 
> https://github.com/apache/lucene/pull/13622 in which 
> RejectedExecutionException is caught and the task is run. This is done with a 
> simple Executor wrapper in IndexSearcher's constructor. I propose we remove 
> the hack/work-around in SolrIndexSearcher. This brings back a 
> LinkedBlockingQueue, and queue size to determine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



Re: [PR] SolrTestCaseJ4: don't reset HttpClient SSL stuff [solr]

2025-02-07 Thread via GitHub


dsmiley merged PR #3037:
URL: https://github.com/apache/solr/pull/3037


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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-02-07 Thread via GitHub


dsmiley commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1947486318


##
solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java:
##
@@ -293,7 +306,7 @@ public void testForwardCompat() throws IOException {
 for (int i = 1;
 i < currentFormatBytes.length;
 i++) { // ignore the first byte. It is version information
-  assertEquals(newFormatBytes[i], currentFormatBytes[i]);
+  assertEquals("for i:" + i, newFormatBytes[i], currentFormatBytes[i]);

Review Comment:
   TestJavaBinCodec should test without this setting.  This is another reason 
to make this a setter or something, which is clearer than a system property.



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



Re: [PR] Refactor UpdateLog.LogPtr to a record [solr]

2025-02-07 Thread via GitHub


dsmiley commented on PR #3166:
URL: https://github.com/apache/solr/pull/3166#issuecomment-2644209292

   Ugh; ECJ doesn't know about Java records.  Probably need to update that.


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



[PR] chore(deps): update opentelemetry to v1.47.0 [solr]

2025-02-07 Thread via GitHub


solrbot opened a new pull request, #3165:
URL: https://github.com/apache/solr/pull/3165

   This PR contains the following updates:
   
   | Package | Type | Update | Change |
   |---|---|---|---|
   | 
[io.opentelemetry:opentelemetry-sdk-trace](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-sdk-testing](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-sdk-extension-autoconfigure](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-sdk](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-exporter-otlp](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-context](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-bom](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   | 
[io.opentelemetry:opentelemetry-api](https://redirect.github.com/open-telemetry/opentelemetry-java)
 | dependencies | minor | `1.46.0` -> `1.47.0` |
   
   ---
   
   ### Release Notes
   
   
   open-telemetry/opentelemetry-java 
(io.opentelemetry:opentelemetry-sdk-trace)
   
   ### 
[`v1.47.0`](https://redirect.github.com/open-telemetry/opentelemetry-java/blob/HEAD/CHANGELOG.md#Version-1470-2025-02-07)
   
   # API
   
   # Incubator
   
   -   Make `ExtendedTracer` easier to use
   
([#​6943](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/6943))
   -   Add `ExtendedLogRecordBuilder#setEventName` and corresponding SDK and 
OTLP serialization
   
([#​7012](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7012))
   -   BREAKING: Drop event API / SDK
   
([#​7053](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7053))
   
   # SDK
   
   -   Remove -alpha artifacts from runtime classpath of stable components
   
([#​6944](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/6944))
   
   # Traces
   
   -   Bugfix: Follow spec on span limits, batch processors
   
([#​7030](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7030))
   -   Add experimental 
`SdkTracerProvider.setScopeConfigurator(ScopeConfigurator)` for
   updating `TracerConfig` at runtime
   
([#​7021](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7021))
   
   # Profiles
   
   -   Add AttributeKeyValue abstraction to common otlp exporters
   
([#​7026](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7026))
   -   Improve profiles attribute table handling
   
([#​7031](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7031))
   
   # Exporters
   
   -   Interpret timeout zero value as no limit
   
([#​7023](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7023))
   -   Bugfix - OTLP: Fix concurrent span reusable data marshaler
   
([#​7041](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7041))
   -   OTLP: Add ability to customize retry exception predicate
   
([#​6991](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/6991))
   -   OTLP: Expand default OkHttp sender retry exception predicate
   
([#​7047](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7047),
   
[#​7057](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7057))
   
   # Extensions
   
   -   Autoconfigure: Consistent application of exporter customizers when 
otel.{signal}.exporter=none
   
([#​7017](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7017))
   -   Autoconfigure: Promote EnvironmentResourceProvider to public API
   
([#​7052](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7052))
   -   Autoconfigure: Ensure `OTEL_PROPAGATORS` still works when 
`OTEL_SDK_DISABLED=true`.
   
([#​7062](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7062))%
   
   # Testing
   
   -   Add W3CBaggagePropagator to `OpenTelemetryRule`, 
`OpenTelemetryExtension`.
   
([#​7056](https://redirect.github.com/open-telemetry/opentelemetry-java/pull/7056))
   
   
   
   ---
   
   ### Configuration
   
   📅 **Schedule**: Branch creation - "* * * * *" (UTC), Automerge - At any time 
(no schedule defined).
   
   🚦 **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
ch

[PR] Refactor UpdateLog.LogPtr to a record [solr]

2025-02-07 Thread via GitHub


dsmiley opened a new pull request, #3166:
URL: https://github.com/apache/solr/pull/3166

   And remove previousPointer (unused)
   


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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-02-07 Thread via GitHub


renatoh commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1947220379


##
solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java:
##
@@ -293,7 +306,7 @@ public void testForwardCompat() throws IOException {
 for (int i = 1;
 i < currentFormatBytes.length;
 i++) { // ignore the first byte. It is version information
-  assertEquals(newFormatBytes[i], currentFormatBytes[i]);
+  assertEquals("for i:" + i, newFormatBytes[i], currentFormatBytes[i]);

Review Comment:
   After rewriting the .bin file with the changed output from 
org.apache.solr.common.util.TestJavaBinCodec#generateAllDataTypes tests like 
org.apache.solr.common.util.TestJavaBinCodec#testBackCompat are passing now. 
But this one testForwardCompat which compares all the bytes fails since the 
bytes are not the same anymore.
   Is it possible I did something wrong when recreated the bin-file?
   
   So the object in the unmarshalle version are the same, but the bytes are for 
some reason not.
   
   Is just took the output from generateAllDataTypes(), called  
javabin.marshall(matchObj, output) with it and wrote the result via a 
FileOutputStream to a file. 
   



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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-02-07 Thread via GitHub


renatoh commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1947220379


##
solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java:
##
@@ -293,7 +306,7 @@ public void testForwardCompat() throws IOException {
 for (int i = 1;
 i < currentFormatBytes.length;
 i++) { // ignore the first byte. It is version information
-  assertEquals(newFormatBytes[i], currentFormatBytes[i]);
+  assertEquals("for i:" + i, newFormatBytes[i], currentFormatBytes[i]);

Review Comment:
   After rewriting the .bin file with the changed output from 
org.apache.solr.common.util.TestJavaBinCodec#generateAllDataTypes tests like 
org.apache.solr.common.util.TestJavaBinCodec#testBackCompat are passing now. 
But this one testForwardCompat which compares all the bytes fails since the 
bytes are not the same anymore.
   Is it possible I did something wrong when recreated the bin-file?
   Is just took the output from generateAllDataTypes(), called  
javabin.marshall(matchObj, output) with it and wrote the result via a 
FileOutputStream to a file. 
   So the object in the unmarshalle version are the same, but the bytes are not



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



Re: [PR] EncryptionRequestHandler supports encryption requests distribution. [solr-sandbox]

2025-02-07 Thread via GitHub


dsmiley commented on code in PR #115:
URL: https://github.com/apache/solr-sandbox/pull/115#discussion_r1946869972


##
encryption/src/main/java/org/apache/solr/encryption/EncryptionRequestHandler.java:
##
@@ -527,31 +512,33 @@ private void commitEncryptionStart(String keyId,
 req.getCore().getUpdateHandler().commit(commitCmd);
   }
 
-  private void encryptAsync(SolrQueryRequest req, long startTimeNs) {
+  private void encryptAsync(SolrQueryRequest req) {
 log.debug("Submitting async encryption");
 executor.submit(() -> {
   try {
 EncryptionUpdateLog updateLog = getEncryptionUpdateLog(req.getCore());
 if (updateLog != null) {
   log.debug("Encrypting update log");
+  long startTimeNs = getTimeSource().getTimeNs();
   boolean logEncryptionComplete = updateLog.encryptLogs();
-  log.info("{} encrypted the update log in {}",
-  logEncryptionComplete ? "Successfully" : "Partially", 
elapsedTime(startTimeNs));
+  log.info("{} encrypted the update log in {} ms",
+  logEncryptionComplete ? "Successfully" : "Partially", 
elapsedTimeMs(startTimeNs));
   // If the logs encryption is not complete, it means some logs are 
currently in use.
   // The encryption will be automatically be retried after the next 
commit which should
   // release the old transaction log and make it ready for encryption.
 }
 
 log.debug("Triggering index encryption");
+long startTimeNs = getTimeSource().getTimeNs();
 CommitUpdateCommand commitCmd = new CommitUpdateCommand(req, true);
 // Trigger EncryptionMergePolicy.findForcedMerges() to re-encrypt
 // each segment which is not encrypted with the latest active key id.
 commitCmd.maxOptimizeSegments = Integer.MAX_VALUE;
 req.getCore().getUpdateHandler().commit(commitCmd);
-log.info("Successfully triggered index encryption with commit in {}", 
elapsedTime(startTimeNs));
+log.info("Successfully triggered index encryption with commit in {} 
ms", elapsedTimeMs(startTimeNs));

Review Comment:
   Looks confusing / error-prone.  Seeing elapsedTimeMs take a parameter with 
"Ns" suffix smells of a bug.  I wonder if we should embrace Instant where we 
can and thus avoid time units in many places?



##
encryption/src/main/java/org/apache/solr/encryption/EncryptionRequestHandler.java:
##
@@ -412,58 +409,46 @@ private void distributeRequest(SolrQueryRequest req, 
SolrQueryResponse rsp, Stri
 rsp.addToLog(ENCRYPTION_STATE, collectionState.value);
   }
   if (log.isInfoEnabled()) {
-long timeMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - 
startTimeNs);
-log.info("Responding encryption distributed state={} success={} for 
keyId={} collection={} timeMs={}",
-(collectionState == null ? null : collectionState.value), success, 
keyId, collectionName, timeMs);
+log.info("Responding encryption distributed state={} success={} for 
keyId={} timeMs={}",
+(collectionState == null ? null : collectionState.value), success, 
keyId, elapsedTimeMs(startTimeNs));
   }
 }
   }
 
-  private SolrClientHolder getHttpSolrClient(SolrQueryRequest req) {
-CoreContainer coreContainer = req.getCore().getCoreContainer();
-CloudSolrClient cloudSolrClient = 
coreContainer.getSolrClientCache().getCloudSolrClient(coreContainer.getZkController().getZkClient().getZkServerAddress());
-if (cloudSolrClient instanceof CloudHttp2SolrClient) {
-  return new SolrClientHolder(((CloudHttp2SolrClient) 
cloudSolrClient).getHttpClient(), false);
-}
-return new SolrClientHolder(new Http2SolrClient.Builder().build(), true);
-  }
-
   protected ModifiableSolrParams 
createDistributedRequestParams(SolrQueryRequest req, SolrQueryResponse rsp, 
String keyId) {
-ModifiableSolrParams params = new ModifiableSolrParams();
-params.set(PARAM_KEY_ID, keyId == null ? NO_KEY_ID : keyId);
-return params;
-  }
-
-  boolean isTimeout(long maxTimeNs) {
-return System.nanoTime() > maxTimeNs;
+return new ModifiableSolrParams().set(PARAM_KEY_ID, keyId == null ? 
NO_KEY_ID : keyId);
   }
 
-  private State sendEncryptionRequestWithRetry(Replica replica, 
ModifiableSolrParams params, Http2SolrClient httpSolrClient, String keyId, 
String collection) {
+  private State sendEncryptionRequestWithRetry(
+  Replica replica,
+  String requestPath,
+  ModifiableSolrParams params,
+  Http2SolrClient httpSolrClient,
+  String keyId) {
 for (int numAttempts = 0; numAttempts < DISTRIBUTION_MAX_ATTEMPTS; 
numAttempts++) {
   try {
-NamedList response = sendEncryptionRequest(replica, params, 
httpSolrClient);
-Object responseStatus = response.get(STATUS);
-Object responseState = response.get(ENCRYPTION_STATE);
-log.info("Encryption state {} status {} for replica {} key

Re: [PR] Refactor UpdateLog.LogPtr to a record [solr]

2025-02-07 Thread via GitHub


dsmiley commented on code in PR #3166:
URL: https://github.com/apache/solr/pull/3166#discussion_r1947245716


##
solr/core/src/java/org/apache/solr/update/UpdateLog.java:
##
@@ -268,40 +268,13 @@ public String toString() {
   protected Meter copyOverOldUpdatesMeter;
   protected SolrMetricsContext solrMetricsContext;
 
-  public static class LogPtr {
-final long pointer;
-final long version;
-// used for entries that are in-place updates and need a pointer to a 
previous update command
-final long previousPointer;

Review Comment:
   This was in here since when it first showed up like 10 years ago, and even 
then wasn't actually *used*.  Populated but not referenced.  CC @chatman 



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



Re: [PR] SOLR-15611: Fix ignored phrase slop after nested query parsing [solr]

2025-02-07 Thread via GitHub


github-actions[bot] commented on PR #280:
URL: https://github.com/apache/solr/pull/280#issuecomment-2644347982

   This PR is now closed due to 60 days of inactivity after being marked as 
stale.  Re-opening this PR is still possible, in which case it will be marked 
as active again.


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



Re: [PR] SOLR-15611: Fix ignored phrase slop after nested query parsing [solr]

2025-02-07 Thread via GitHub


github-actions[bot] closed pull request #280: SOLR-15611: Fix ignored phrase 
slop after nested query parsing
URL: https://github.com/apache/solr/pull/280


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



Re: [PR] EncryptionRequestHandler supports encryption requests distribution. [solr-sandbox]

2025-02-07 Thread via GitHub


bruno-roustant commented on PR #115:
URL: https://github.com/apache/solr-sandbox/pull/115#issuecomment-2643063189

   Thank you for your thorough review David. I have updated to integrate your 
remarks.


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



Re: [PR] SOLR-17635: unmarshalling Map to SimpleOrderedMap if key i of type St… [solr]

2025-02-07 Thread via GitHub


dsmiley commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1946576896


##
solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java:
##
@@ -863,6 +868,26 @@ protected Map readMap(DataInputInputStream 
dis, int sz) throws I
 return m;
   }
 
+  @SuppressWarnings({"rawtypes", "unchecked"})
+  protected Map 
readMapAsSimpleOrderedMapForStringKeys(DataInputInputStream dis, int sz)
+  throws IOException {
+Map m = null;
+for (int i = 0; i < sz; i++) {
+  Object key = readVal(dis);
+
+  if (m == null) {
+if (key instanceof String) {
+  m = new SimpleOrderedMap<>(sz);
+} else {
+  m = newMap(sz);
+}
+  }
+  Object val = readVal(dis);
+  m.put(key, val);
+}
+return m;
+  }
+

Review Comment:
   Yes; consider this a hypothesis to be tested (by the results of the totality 
of Solr's test suite).



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



Re: [PR] SOLR-17628: Add query quantiles metrics to prometheus endpoint [solr]

2025-02-07 Thread via GitHub


mlbiscoc commented on code in PR #3164:
URL: https://github.com/apache/solr/pull/3164#discussion_r1946662321


##
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreHandlerMetric.java:
##
@@ -28,7 +28,7 @@ public class SolrCoreHandlerMetric extends SolrCoreMetric {
   public static final String CORE_REQUESTS_TOTAL = 
"solr_metrics_core_requests";
   public static final String CORE_REQUESTS_UPDATE_HANDLER = 
"solr_metrics_core_update_handler";
   public static final String CORE_REQUESTS_TOTAL_TIME = 
"solr_metrics_core_requests_time";

Review Comment:
   To me this feels like it doesn't belong anymore. Your dropwizard timer -> 
prometheus summary exporting now gives you not only the quantile data but also 
sum and count in a sliding window. Not sure if the total time as a gauge over 
the lifetime of the core is useful but someone might disagree. I think this can 
even be calculated with `promQL` with the new metric you made below. Also the 
naming is pretty much identical making it confusing 
`solr_metrics_core_requests_time` and `solr_metrics_core_request_time`



##
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreHandlerMetric.java:
##
@@ -28,7 +28,7 @@ public class SolrCoreHandlerMetric extends SolrCoreMetric {
   public static final String CORE_REQUESTS_TOTAL = 
"solr_metrics_core_requests";
   public static final String CORE_REQUESTS_UPDATE_HANDLER = 
"solr_metrics_core_update_handler";
   public static final String CORE_REQUESTS_TOTAL_TIME = 
"solr_metrics_core_requests_time";
-  public static final String CORE_REQUEST_TIMES = 
"solr_metrics_core_average_request_time";
+  public static final String CORE_REQUEST_TIMES = 
"solr_metrics_core_request_time";

Review Comment:
   I think the unit of time should exist in its name so people don't need to 
figure it out and this was missed previously.
   ```suggestion
 public static final String CORE_REQUEST_TIMES = 
"solr_metrics_core_request_time_ms";
   ```



##
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreSearcherMetric.java:
##
@@ -27,7 +27,7 @@
 /** Dropwizard metrics of name SEARCHER.* */
 public class SolrCoreSearcherMetric extends SolrCoreMetric {
   public static final String CORE_SEARCHER_METRICS = 
"solr_metrics_core_searcher_documents";
-  public static final String CORE_SEARCHER_TIMES = 
"solr_metrics_core_average_searcher_warmup_time";
+  public static final String CORE_SEARCHER_TIMES = 
"solr_metrics_core_searcher_warmup_time";

Review Comment:
   ```suggestion
 public static final String CORE_SEARCHER_TIMES = 
"solr_metrics_core_searcher_warmup_time_ms";
   ```
   Same as above assuming this is in `ms`



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