Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 64569 invoked from network); 28 Mar 2011 13:37:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 13:37:20 -0000 Received: (qmail 83590 invoked by uid 500); 28 Mar 2011 13:37:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 83555 invoked by uid 500); 28 Mar 2011 13:37:19 -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 83547 invoked by uid 99); 28 Mar 2011 13:37:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 13:37:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of matt.goodall@gmail.com designates 209.85.216.52 as permitted sender) Received: from [209.85.216.52] (HELO mail-qw0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 13:37:12 +0000 Received: by qwb8 with SMTP id 8so2653579qwb.11 for ; Mon, 28 Mar 2011 06:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=4jhnJOXPRXxMlOdLcLXj4gEHzo9DCKu4M5g5vQ02Zag=; b=XsyRJJYIqinIZR0lChNEnG3pMBRQJuHRsM3n4ky1/3Ifpk8jCiPK5H3HenZrm+9o+I 2aFLX/FL8PgfTqonJ9Fkplw8zD9l0pWu+25OJufGasma7ucGycORiWxBZmAVuwJ6/59d 5pvwt/Uf4VvFUWq86xwEuUx73cSbPm/QekzL4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pvklPXDU0N/w0Dhr4+YsvXKZOmUOaeNVv4/BHU2y+PFgE0iYV9PH6BmcQtJASgIMdy i4/67iIe8Fbj81IYXeePKsnRGWJZKxvuhkio0N+vng9vavZFJAORS7rXIoSpALssCFsd eGAhFbgYOHvvwGeCfL2jsFa5wRPedCW0kasAM= MIME-Version: 1.0 Received: by 10.229.42.142 with SMTP id s14mr3369993qce.174.1301319411667; Mon, 28 Mar 2011 06:36:51 -0700 (PDT) Received: by 10.229.59.95 with HTTP; Mon, 28 Mar 2011 06:36:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Mar 2011 14:36:51 +0100 Message-ID: Subject: Re: Strange bug on long polling changes feed, using OS X From: Matt Goodall To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=00163683238645930b049f8b0932 X-Virus-Checked: Checked by ClamAV on apache.org --00163683238645930b049f8b0932 Content-Type: text/plain; charset=UTF-8 On 28 March 2011 13:32, Jyrki Pulliainen wrote: > Hi, > > I've run into a strange bug with longpoll changes feed, using OS X. I > can not reproduce this bug on Ubuntu Linux running the same version of > CouchDB. This has been verified on two different OS X computers, both > running Snow Leopard in both, 32 bit mode and 64 bit. The other one > has the Couchbase version of CouchDB installed, the other one has one > installed via homebrew. > > Problem is following: I have my own CouchDB driver for Tornado > Asynchronous web framework called Trombi[1]. It's basically just a > wrapper around HTTP calls to CouchDB, making them play nicely with the > asynchronous nature of Tornado (unlike other Python CouchDB > libraries). I've made a test[2] that opens up longpolling changes feed > and writes a document in database and then waits to receive the same > document via changes feed listener. What happens is that the changes > feed listener never gets the reply or if it gets one, it is empty (ie. > rows: []). > > First guess was the the use of pycurl (and thus libcurl) to be the > problem, but after switching to pure Python SimpleHTTPClient offered > by Tornado the problem persisted. Next I blamed it on Tornado > framework, but further inspection using tcpdump and tcpflow revealed > that the CouchDB actually produces an erroneous reply, an empty > changes feed result (even though there should be at least one change). > > Has anyone bumped in to a similiar problem? I can't reproduce this on > command line with pycurl, only with my tests. To simply reproduce this > yourself, just clone Trombi[1], check out branch > wip/simple-httpclient-compatibility, install tornado, nosetests and > pycurl via pip/easy_install and make sure you have couchdb binary in > PATH. After this, just run nosetests -v and the tests should stall on > the test mentioned before[2]. > I hit an issue on Linux so it's probably unrelated, but this sounds similar to a problem I recently came across with the _changes feed when using a filter and limit=1. It's been fixed in the 1.0.x branch but I don't think it's in an official release yet. See, https://github.com/apache/couchdb/commit/6d8f063e2d05a3edaf029b857a7af3f86bd6e8bc . - Matt --00163683238645930b049f8b0932--