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 7EA2EF550 for ; Wed, 1 May 2013 09:35:59 +0000 (UTC) Received: (qmail 25273 invoked by uid 500); 1 May 2013 09:35:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 24801 invoked by uid 500); 1 May 2013 09:35:54 -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 24773 invoked by uid 99); 1 May 2013 09:35:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 09:35:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dch@jsonified.com designates 209.85.215.49 as permitted sender) Received: from [209.85.215.49] (HELO mail-la0-f49.google.com) (209.85.215.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 09:35:49 +0000 Received: by mail-la0-f49.google.com with SMTP id fp13so1172409lab.22 for ; Wed, 01 May 2013 02:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jsonified.com; s=google; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wcuQcV/zTP0PAxmjxURXwOhcfTdVNv74wCJeItIEM8Y=; b=rjm7Qz3IpTE1K7CczL1hOd3O6IELBVuciuyC12Ipo+zMu4CMn20n94jKxA9cXkKyya yhuYVluTTPRB7dmICOitWDFBNYlXCvrzxp4Yd1n4U8B/NlvLZ1tqkUaIoGwrRfSuoPqW yAEx3lHZXcSN69wBLgYec/Nvf7IfYmsuCmFPs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding:x-gm-message-state; bh=wcuQcV/zTP0PAxmjxURXwOhcfTdVNv74wCJeItIEM8Y=; b=AF7/oHOOJu9ItOEjYBsi0/MWKn/VgsR9AnxRe4VsZ5PefgiKeF9g4HM0z55T3DhtLh UucswBh2GpwjU+udAlic/hIL12tids9RscRdW6zo0MEQbLR+HpJ+aZVgFPjwtpSKVQNR kE5qipvOlLXBkDb19wiyliybzpRdT7UHepDJLf8LbRgxu73Y6nS8xaXKXd44vFGnESgM wxzx6/Sjn4eAU/mSudP7KqpgH+C72zVv534iBBWdFpdO60eNKxKuJDhCSCbLkiC7Wg6z CsFfoqFDybSlzHu0qTLRA+4Fzm7UphIs3IKnK7e001gwcIoWZsBc2L/hTGBaVVqDIrSc Ce6Q== MIME-Version: 1.0 X-Received: by 10.112.20.199 with SMTP id p7mr892989lbe.71.1367400927613; Wed, 01 May 2013 02:35:27 -0700 (PDT) Received: by 10.112.149.73 with HTTP; Wed, 1 May 2013 02:35:27 -0700 (PDT) X-Originating-IP: [84.112.19.176] In-Reply-To: <5180BF52.3040605@cego.dk> References: <5180BF52.3040605@cego.dk> Date: Wed, 1 May 2013 11:35:27 +0200 Message-ID: Subject: Re: Replication misses documents From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnG/h5FSWREvvqgf2vi5EAKuJelHb4xJR/CWlFyskglaWKSMuUD+7Zj65lmYvIIg7DJR7Md X-Virus-Checked: Checked by ClamAV on apache.org On 1 May 2013 09:08, Robert Larsen wrote: > Hi all > > I have been playing with CouchDB and I am having a weird problem. > A database I have replicated (and is continuously replicating) contains > many documents that are not present in the replicated version even thou > it says that the replication is 100% done. > > And even rather old documents are missing (the database I replicate from > is itself a replication of the Node NPM registry). > > Getting the 'underscore' document from the source database: > $ curl -s -X GET http://192.168.192.70:5984/registry/underscore > {"_id":"underscore","_rev":"117-eaf1f4e86f1e84f50d5df55fb56998a0","name":= "underscore","description":"JavaScript's > functional programming helper > library.","dist-tags":{"latest":"1.4.4","stable":"1.4.4"},"versions":{"1.= 0.3":{"name":"underscore"........ > > Viewing the active tasks on the replicated database: > $ curl -s -X GET http://localhost:5984/_active_tasks > [{"pid":"<0.9387.5>","checkpointed_source_seq":38146,"continuous":true,"d= oc_id":null,"doc_write_failures":0,"docs_read":0,"docs_written":0,"missing_= revisions_found":0,"progress":100,"replication_id":"34a476394d72da3f2b4d85f= 7f8acd50c+continuous","revisions_checked":0,"source":"http://192.168.192.70= :5984/registry/","source_seq":38146,"started_on":1367329977,"target":"regis= try","type":"replication","updated_on":1367391827}] > > See, 100% replicated. > > Getting the 'underscore' document from the replication: > $ curl -s -X GET http://localhost:5984/registry/underscore > {"error":"not_found","reason":"missing"} > > > What have I done wrong? The source_seq is very low, compared to the current npm registry: curl -s http://isaacs.iriscouch.com/registry | json_reformat | grep commit= ted "committed_update_seq": 474407 So either you're not pointing at the actual registry, or this replication is no longer running for some reason. I'd cancel the replication, and re-create it using the _replicator endpoint so it gets picked up even if the server restarts. Something like this (untested): curl -X PUT http://admin:passwd@localhost:5984/_replicator/npm-mirror --data-binary '{"source":"https://isaacs.iriscouch.com/registry", "target":"npm-mirror", "continuous": true}' -H "Content-Type: application/json" For the failure, a snippet of the couch.log file will probably explain why this is failing. A+ Dave