dsmiley commented on code in PR #3446:
URL: https://github.com/apache/solr/pull/3446#discussion_r2244259175
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -775,7 +792,7 @@ public QueryResult search(QueryResult qr, QueryCommand cmd)
throws IOException {
protected void search(List<LeafReaderContext> leaves, Weight weight,
Collector collector)
throws IOException {
QueryLimits queryLimits = QueryLimits.getCurrentLimits();
- if (useExitableDirectoryReader || !queryLimits.isLimitsEnabled()) {
+ if (EnvUtils.getPropertyAsBool(EXITABLE_READER_PROPERTY) ||
!queryLimits.isLimitsEnabled()) {
Review Comment:
should this instead check if the existing reader is an instance of
ExitableDirectoryReader? It would have already been wrapped.
##########
solr/core/src/test/org/apache/solr/search/TestQueryLimits.java:
##########
@@ -88,13 +89,12 @@ public void testQueryLimits() throws Exception {
assertNotNull(
"should have partial results for expr " + matchingExpr,
rsp.getHeader().get("partialResults"));
- if (matchingExpr.contains(".")) {
- assertEquals(matchingExpr, limit.trippedBy);
- } else {
- assertTrue(
- "expected result to start with " + matchingExpr + " but was " +
limit.trippedBy,
- limit.trippedBy.startsWith(matchingExpr));
- }
+ assertFalse("should have trippedBy info",
limit.getTrippedBy().isEmpty());
Review Comment:
I suspect you intended to put the trip info in the assert message string.
--
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]