Hello, Wei. Have you tried to abandon heavy queries with https://lucene.apache.org/solr/guide/8_1/common-query-parameters.html#CommonQueryParameters-ThetimeAllowedParameter ? It may or may not be able to stop stats. https://github.com/apache/lucene-solr/blob/25eda17c66f0091dbf6570121e38012749c07d72/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java#L223 can clarify it.
On Mon, Oct 7, 2019 at 8:19 PM Wei <weiwan...@gmail.com> wrote: > Hi, > > Recently we encountered a problem when solr cloud query latency suddenly > increase, many simple queries that has small recall gets time out. After > digging a bit I found that the root cause is some stats queries happen at > the same time, such as > > > /solr/mycollection/select?stats=true&stats.field=unique_ids&stats.calcdistinct=true > > > > I see unique_ids is a high cardinality field so this query is quite > expensive. But why a small volume of such query blocks other queries and > make simple queries time out? I checked the solr thread pool and see there > are plenty of idle threads available. We are using solr 7.6.2 with a 10 > shard cloud set up. > > Is there a way to block certain solr queries based on url pattern? i.e. > ignore the stats.calcdistinct request in this case. > > > Thanks, > > Wei > -- Sincerely yours Mikhail Khludnev