> On Sept. 17, 2014, 3:44 a.m., Steve Davids wrote: > > trunk/solr/core/src/java/org/apache/solr/search/SolrQueryTimeout.java, line > > 63 > > <https://reviews.apache.org/r/25658/diff/4/?file=691692#file691692line63> > > > > You may want to consider providing a little more detail in the comments > > that timeOutAt is the time in the future in nanos. Would it make sense to > > just pass the timeout offset here and have it calculate the future time > > within the set method? i.e. pass in 1000ms instead of current time + > > offset. Or another alternative is to provide a date/calendar object in the > > future (may be a bit overkill but then you don't need to think twice of if > > you need to pass in the time in millis or nanos). (Also applies to the > > QueryTimeout too) > > Anshum Gupta wrote: > That makes sense, I'll improve that to do the math inside > SolrQueryTimeout instead so you could just pass the timeAllowed value and > it'd do the calculation.
This is now done and a part of the latest patch. - Anshum ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25658/#review53648 ----------------------------------------------------------- On Sept. 17, 2014, 5:25 a.m., Anshum Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25658/ > ----------------------------------------------------------- > > (Updated Sept. 17, 2014, 5:25 a.m.) > > > Review request for lucene. > > > Bugs: SOLR-5986 > https://issues.apache.org/jira/browse/SOLR-5986 > > > Repository: lucene > > > Description > ------- > > Timeout queries when they take too long to rewrite/enumerate over terms. > > > Diffs > ----- > > > trunk/lucene/core/src/java/org/apache/lucene/index/ExitableDirectoryReader.java > PRE-CREATION > trunk/lucene/core/src/java/org/apache/lucene/index/QueryTimeout.java > PRE-CREATION > trunk/lucene/core/src/java/org/apache/lucene/index/QueryTimeoutBase.java > PRE-CREATION > > trunk/lucene/core/src/test/org/apache/lucene/index/TestExitableDirectoryReader.java > PRE-CREATION > trunk/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java > 1625349 > > trunk/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java > 1625349 > trunk/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java > 1625349 > trunk/solr/core/src/java/org/apache/solr/search/SolrQueryTimeout.java > PRE-CREATION > trunk/solr/core/src/test/org/apache/solr/TestDistributedSearch.java 1625349 > trunk/solr/core/src/test/org/apache/solr/TestGroupingSearch.java 1625349 > > trunk/solr/core/src/test/org/apache/solr/core/ExitableDirectoryReaderTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/25658/diff/ > > > Testing > ------- > > Added Lucene/Solr tests. Tested a bit manually. > > > Thanks, > > Anshum Gupta > >
