You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "David Eric Pugh (Jira)" <ji...@apache.org> on 2020/08/17 20:19:00 UTC

[jira] [Commented] (SOLR-14413) allow timeAllowed and cursorMark parameters

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

David Eric Pugh commented on SOLR-14413:
----------------------------------------

[~bvd] emailed the mailing list about this ticket.   Reading through the feedback, it appears what we need to do is:

1) update the tests to demonstrate the two parameters working together, and what happens when a timeAllowed is exceeded.   Looking at it now, the tests that demonstrate they don’t work together have been removed, but no new ones added.  

2) Updating the ref guide to explain what behavior occurs when the timeAllowed is exceeded.


> allow timeAllowed and cursorMark parameters
> -------------------------------------------
>
>                 Key: SOLR-14413
>                 URL: https://issues.apache.org/jira/browse/SOLR-14413
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: John Gallagher
>            Priority: Minor
>         Attachments: SOLR-14413.patch, timeallowed_cursormarks_results.txt
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Ever since cursorMarks were introduced in SOLR-5463 in 2014, cursorMark and timeAllowed parameters were not allowed in combination ("Can not search using both cursorMark and timeAllowed")
> , from [QueryComponent.java|#L359]]:
>  
> {code:java}
>  
>  if (null != rb.getCursorMark() && 0 < timeAllowed) {
>   // fundamentally incompatible
>   throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Can not search using both " + CursorMarkParams.CURSOR_MARK_PARAM + " and " + CommonParams.TIME_ALLOWED);
> } {code}
> While theoretically impure to use them in combination, it is often desirable to support cursormarks-style deep paging and attempt to protect Solr nodes from runaway queries using timeAllowed, in the hopes that most of the time, the query completes in the allotted time, and there is no conflict.
>  
> However if the query takes too long, it may be preferable to end the query and protect the Solr node and provide the user with a somewhat inaccurate sorted list. As noted in SOLR-6930, SOLR-5986 and others, timeAllowed is frequently used to prevent runaway load.  In fact, cursorMark and shards.tolerant are allowed in combination, so any argument in favor of purity would be a bit muddied in my opinion.
>  
> This was discussed once in the mailing list that I can find: [https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201506.mbox/%3C5591740B.4080807@elyograg.org%3E] It did not look like there was strong support for preventing the combination.
>  
> I have tested cursorMark and timeAllowed combination together, and even when partial results are returned because the timeAllowed is exceeded, the cursorMark response value is still valid and reasonable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org