epugh commented on code in PR #5238:
URL: https://github.com/apache/solr/pull/5238#discussion_r4414208554


##########
solr/core/src/java/org/apache/solr/handler/component/SearchRequestInfo.java:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.component;
+
+import java.util.List;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.request.SolrRequestInfo;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.util.ThreadCpuTimer;
+
+/**
+ * A completed search request, as passed to {@link SearchRequestListener}. 
Listeners must not retain
+ * or modify {@code req}, {@code rsp} or {@code rb}; copy what they need.
+ *
+ * @param req the request
+ * @param rsp the response
+ * @param rb null if the handler failed before creating it or it belongs to 
another request
+ * @param handlerPath the path the request log uses
+ * @param elapsedMs time since the request started
+ * @param cpuTimeMs null unless {@code solr.log.cputime=true}; includes the 
CPU shards reported when
+ *     distributed
+ * @param hits null if not available
+ * @param shardCount number of shards targeted; 0 for a non-distributed request
+ * @param failure the exception set on the response, if any
+ * @param partialResults whether the response header marks the results as 
partial, for example after
+ *     a timeout
+ * @lucene.experimental
+ */
+public record SearchRequestInfo(
+    SolrQueryRequest req,
+    SolrQueryResponse rsp,
+    ResponseBuilder rb,
+    String handlerPath,
+    long elapsedMs,
+    Long cpuTimeMs,
+    Long hits,
+    int shardCount,
+    Throwable failure,
+    boolean partialResults) {
+
+  static SearchRequestInfo from(SolrQueryRequest req, SolrQueryResponse rsp) {

Review Comment:
   makes sense...    I am hoping that in th efuture...   We have a way to 
balance query and index workloads intelligently...   So you can maiximise what 
you get out of a node....



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to