Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D4A58200CD7 for ; Tue, 1 Aug 2017 22:50:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D346D161535; Tue, 1 Aug 2017 20:50:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 244421614CC for ; Tue, 1 Aug 2017 22:50:25 +0200 (CEST) Received: (qmail 16269 invoked by uid 500); 1 Aug 2017 20:50:24 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 16257 invoked by uid 99); 1 Aug 2017 20:50:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 20:50:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 84D681A01A6 for ; Tue, 1 Aug 2017 20:50:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7VXVPr2Hdsv3 for ; Tue, 1 Aug 2017 20:50:21 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D1B845F572 for ; Tue, 1 Aug 2017 20:50:20 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id e124so26991478oig.2 for ; Tue, 01 Aug 2017 13:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=kRnIwTIpLiI2yDPzO2ClmO2sakRgmsM4xwg5goPgRQE=; b=SCF2YDg3oLJgmftg64NV4bkCCk6f6PG/x4REsvyUf31yc54Ep3PwXLcoeEeuuYPout xwNPdIt1enEBw5dRcVy1MauB1/sINOg5ATrkaczFvNGIVu4Treim1wK85BvqeVkbUATM 2YokSyf19CK/+Bzs9WB6QuecWHSYeUsChSBkSYbcTbHz94GvEisfpvRdRvPyPamHL4YZ TOhM/l/0jn1IUoFpl8LATGOVI26ocpzMZR+n9/Ohj0ohSZfPF+RUjpR6tQrLjIMgaV4N rBaQCe3tp0uDBXivRuQozQ9lZDJGxd93U3XJXsM6ssYu5Yh1fFz5DFYJNnwWNBkaIs3B EYVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kRnIwTIpLiI2yDPzO2ClmO2sakRgmsM4xwg5goPgRQE=; b=cPHhsop7APd8FaSGUMn8ewSQft5i7osg5nBR5kHn0qWuwuR3XcB99NOA4MGbrOgcJ5 b8btJrL1OSyfsBK3awLY0r0JLBtggwReI6kePt92G6taGtXlb6qViux5copCLBYDceP4 OkQxHcsy2V9yD1Mu2sM/uOPYhvcTw640Qr0qm738C4bb6RF5zNTOle/r9dptMXHdPNpp YJT/G3rmfzdGy1gYYfc5bw8WULssGAYgd0gmERdrI4b/BC4BloYJruzGkEtCN0zNgN1o 5RGKyE6yncxvSYyYZvO+gB2iGUzZEknyjDoM2Wq/Fl9idw5YIqfhpRAjaM0XZKJV7stw lpaA== X-Gm-Message-State: AIVw1125V/t4ERL+jCJxsRq5uUsLRy5whgM/hVVofbJHz6lcc2t1T+BW q+3nfTLr+Z9CX25CTi5m7/899RMTCA== X-Received: by 10.202.241.10 with SMTP id p10mr16916518oih.56.1501620619684; Tue, 01 Aug 2017 13:50:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.134.5 with HTTP; Tue, 1 Aug 2017 13:50:19 -0700 (PDT) From: Chris Troullis Date: Tue, 1 Aug 2017 16:50:19 -0400 Message-ID: Subject: Inconsistency in results between replicas using CloudSolrClient To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary="94eb2c0933a89fb14a0555b74bc7" archived-at: Tue, 01 Aug 2017 20:50:27 -0000 --94eb2c0933a89fb14a0555b74bc7 Content-Type: text/plain; charset="UTF-8" Hi, I think I know the answer to this question, but just wanted to verify/see what other people do to address this concern. I have a Solr Cloud setup (6.6.0) with 2 nodes, 1 collection with 1 shard and 2 replicas (1 replica per node). The nature of my use case requires frequent updates to Solr, and documents are being added constantly throughout the day. I am using CloudSolrClient via SolrJ to query my collection and load balance across my 2 replicas. Here's my question: As I understand it, because of the nature of Solr Cloud (eventual consistency), and the fact that the soft commit timings on the 2 replicas will not necessarily be in sync, would it not be possible to run into a scenario where, say a document gets indexed on replica 1 right before a soft commit, but indexed on replica 2 right after a soft commit? In this scenario, using the load balanced CloudSolrClient, wouldn't it be possible for a user to do a search, see the newly added document because they got sent to replica 1, and then search again, and the newly added document would disappear from their results since they got sent to replica 2 and the soft commit hasn't happened yet? If so, how do people typically handle this scenario in NRT search cases? It seems like a poor user experience if things keep disappearing and reappearing from their search results randomly. Currently the only thought I have to prevent this is to write (or extend) my own solr client to stick a user's session to a specific replica (unless it goes down), but still load balance users between the replicas. But of course then I have to manage all of the things CloudSolrClient manages manually re: cluster state, etc. Can anyone confirm/deny my understanding of how this works/offer any suggestions to eliminate the scenario in question from occurring? Thanks, Chris --94eb2c0933a89fb14a0555b74bc7--