Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BC91F38A for ; Tue, 16 Apr 2013 22:30:00 +0000 (UTC) Received: (qmail 40571 invoked by uid 500); 16 Apr 2013 22:29:56 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 40519 invoked by uid 500); 16 Apr 2013 22:29:56 -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 40504 invoked by uid 99); 16 Apr 2013 22:29:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 22:29:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of otis.gospodnetic@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qa0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 22:29:52 +0000 Received: by mail-qa0-f45.google.com with SMTP id g10so1329286qah.18 for ; Tue, 16 Apr 2013 15:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=8vkyDDkrRyzPeFVv/Wv/g34uEHJg5iFBYSvQF2/SCt0=; b=UDn5CSUp8G+81T40ZQ+g4lptk+rcCAme0KTFa3QTc9Vz+oz59KfJenDVzc6R1h4wNd c/EKMuwtkSBEbqMJhnUoti85nL7h+kYETpBjNEVnaiPu2ZIL7xplpvwa4JVvdE0TaLV5 hGWbZMAUKIDiR7qhe+NIuK5gbuSEnLeWJjk381Z6b3sbx/TlN5HBoCsS9EyyaI8Go8T5 KqoJkaqKvBN7fn6e7BHc0Obvo9EBwltK2wnfv158lbHmLjO5SST41DIes9M7Ol8YZt/q w/glvxljK6tjIXnMKj9XC3h7igGy/X9xkIGfA76bX1Qt0BzHMtcy7KY6QDeE1HmDORot Nzwg== MIME-Version: 1.0 X-Received: by 10.49.38.8 with SMTP id c8mr5327332qek.3.1366151372074; Tue, 16 Apr 2013 15:29:32 -0700 (PDT) Received: by 10.224.33.68 with HTTP; Tue, 16 Apr 2013 15:29:32 -0700 (PDT) In-Reply-To: <4b8fb256.17d83.13e115851d0.Coremail.suonayi2006@163.com> References: <4b8fb256.17d83.13e115851d0.Coremail.suonayi2006@163.com> Date: Tue, 16 Apr 2013 18:29:32 -0400 Message-ID: Subject: Re: Push/pull model between leader and replica in one shard From: Otis Gospodnetic To: "solr-user@lucene.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, Replication when everything is working well is push: * request comes to any node, ideally leader * doc is indexed on leader * doc is copied to replicas If replica falls too far behind (not exactly sure what the "too far" threshold is), it uses pull to replicate the whole index from leader. Mark can answer the part about where tlog gets replayed to catch up on docs that were missed while big index replication pull was happening. This is a good thread to read on this topic: http://search-lucene.com/m/y1yj218J2v82 Otis -- Solr & ElasticSearch Support http://sematext.com/ On Tue, Apr 16, 2013 at 1:36 AM, SuoNayi wrote: > Hi, can someone explain more details about what model is used to sync docs between the lead and > replica in the shard? > The model can be push or pull.Supposing I have only one shard that has 1 leader and 2 replicas, > when the leader receives a update request, does it will scatter the request to each available and active > replica at first and then processes the request locally at last?In this case if the replicas are able to catch > up with the leader can I think this is a push model that the leader pushes updates to it's replicas? > > > What happens if a replica is behind the leader?Will the replica pull docs from the leader and keep > a track of the coming updates from the lead in a log(called tlog)?If so when it complete pulling docs > it will replay updates in the tlog at last? > > > > > regards > > > > > > >