Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9CF118098 for ; Thu, 30 Jul 2015 08:20:06 +0000 (UTC) Received: (qmail 18077 invoked by uid 500); 30 Jul 2015 08:20:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17894 invoked by uid 500); 30 Jul 2015 08:20:05 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 17754 invoked by uid 99); 30 Jul 2015 08:20:04 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2015 08:20:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5CCD2D8C77 for ; Thu, 30 Jul 2015 08:20:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id cwItCMX9a-8p for ; Thu, 30 Jul 2015 08:20:02 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 3EA0421435 for ; Thu, 30 Jul 2015 08:20:02 +0000 (UTC) Received: by wibxm9 with SMTP id xm9so233403648wib.0 for ; Thu, 30 Jul 2015 01:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NKRWDxLwkze68Y1HaVgig/koR1ZkPNOkZw1KJsLn6co=; b=gFltQIVKz2XDjjQ90DVtDYibp/SNGv8Duz7GfUPeOsMRPG9X1dajw/DR1Q2z7C9Gom eoASBj2DOUlVVelBcnrEWJ6/bj2jvYvSEZfvjAI5FqvqUnNiQM+6HdImQ1DL7bsHxL/w ViOoy+4Xpvomd2WkMM93b9+P4oa6N30MfDeC+aimjthQ6nT/yySYLfRJq0dFyHxCdcOz iCvOL8WrQLewEzQcTC7A+XEtc81p5bQ0wIIXaY1+Vgb6lely62DMDfktqTQAyk+uCxP8 iuo73Ga1fLrUqs5JPhrUrby2W07gVDD+vaXC8/OMDEuBj8GdGSGnrTs5aZKdhdn2o8ry TtDg== MIME-Version: 1.0 X-Received: by 10.180.77.107 with SMTP id r11mr3926238wiw.74.1438244356984; Thu, 30 Jul 2015 01:19:16 -0700 (PDT) Received: by 10.194.174.33 with HTTP; Thu, 30 Jul 2015 01:19:16 -0700 (PDT) In-Reply-To: References: Date: Thu, 30 Jul 2015 10:19:16 +0200 Message-ID: Subject: Re: Using _active_tasks to track continuous replication status From: Foucauld Degeorges To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=f46d043c8230ff9385051c135b8d --f46d043c8230ff9385051c135b8d Content-Type: text/plain; charset=UTF-8 Awesome, thanks. Now, to push it a bit further, let's suppose I have three databases in replication : A -> B -> C, and I need to know which document created in A is the last one that got to C, so I can display a "synchronized / not synchronized" symbol next to the various documents in my view. To know which document got to C, here is my idea: using B's _active_tasks I know which update sequence of B got to C. I query B's _changes feed to know what document/revision that update sequence concerns. I query that same document/revision on A using the local_seq option. Now I know which update sequence of A is the last one that got to C, assuming that* sequences are kept in the same order* through two replications. Is that a safe assumption? Or can anyone think of a simpler way to do this, without having to HEAD each document individually? Foucauld 2015-07-29 17:18 GMT+02:00 Alexander Shorin : > On Wed, Jul 29, 2015 at 6:13 PM, Foucauld Degeorges > wrote: > > Just to clarify, by "completed sequence" you mean > checkpointed_source_seq, > > is that right ? > > Yes. This is an update sequence of source which is recorded in > checkpoint what means that all the data up to that value are already > replicated. > > -- > ,,,^..^,,, > --f46d043c8230ff9385051c135b8d--