From dev-return-364086-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri Aug 2 18:45:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 24811180647 for ; Fri, 2 Aug 2019 20:45:03 +0200 (CEST) Received: (qmail 58035 invoked by uid 500); 2 Aug 2019 18:45:01 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 58024 invoked by uid 99); 2 Aug 2019 18:45:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2019 18:45:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9225BE2FA3 for ; Fri, 2 Aug 2019 18:45:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3FA0D2419D for ; Fri, 2 Aug 2019 18:45:00 +0000 (UTC) Date: Fri, 2 Aug 2019 18:45:00 +0000 (UTC) From: "Christine Poerschke (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-13257) Enable replica routing affinity for better cache usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-13257?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1689= 9135#comment-16899135 ]=20 Christine Poerschke commented on SOLR-13257: -------------------------------------------- Thanks [~tomasflobbe] for the ping! I left some comments on the pull reques= ts but have no concerns, it's a very elegant code solution indeed, thank yo= u [~mgibney] for developing and contributing it. > Enable replica routing affinity for better cache usage > ------------------------------------------------------ > > Key: SOLR-13257 > URL: https://issues.apache.org/jira/browse/SOLR-13257 > Project: Solr > Issue Type: New Feature > Components: SolrCloud > Reporter: Michael Gibney > Assignee: Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe > Priority: Minor > Attachments: AffinityShardHandlerFactory.java, SOLR-13257.patch, = SOLR-13257.patch > > Time Spent: 2h 50m > Remaining Estimate: 0h > > For each shard in a distributed request, Solr currently routes each reque= st randomly via [ShufflingReplicaListTransformer|https://github.com/apache/= lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/componen= t/ShufflingReplicaListTransformer.java] to a particular replica. In setups = with replication factor >1, this=C2=A0normally results in a situation where= subsequent requests (which one would hope/expect to leverage cached result= s from previous related requests) end up getting routed to a replica that h= asn't seen any related requests. > The problem can be replicated by issuing a relatively expensive query (ma= ybe containing common terms?). The first request initializes the {{queryRes= ultCache}} on the consulted replicas. If replication factor >1 and there ar= e a sufficient number of shards, subsequent requests will likely be routed = to at least one replica that _hasn't_ seen the query before. The replicas w= ith uninitialized caches become a bottleneck, and from the client's perspec= tive, many subsequent requests appear not to benefit from caching at all. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org