Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 66647 invoked from network); 28 Mar 2011 13:43:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 13:43:17 -0000 Received: (qmail 93024 invoked by uid 500); 28 Mar 2011 13:43:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92993 invoked by uid 500); 28 Mar 2011 13:43:16 -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 92985 invoked by uid 99); 28 Mar 2011 13:43:15 -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:43:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,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 jyrki.pulliainen@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 13:43:09 +0000 Received: by bwj24 with SMTP id 24so3944404bwj.11 for ; Mon, 28 Mar 2011 06:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=c4X2hIoiixh2tkUzxxTF2+MIWi1S9tXVTlhcN7Gf1QY=; b=fFe0PwUm9BsA8tmHf2i6aVtR2iMaRoB6P834EdOd/Cj+K3/DqG8y10L5cofwbk+guE pobSSF5HrboiYTcN/7abV5vj7fA9/YAb3pZxg5jMXejVXnusoitCTT33YTfAedAgBXht 61Z4JYPEig7OpWL506JPxR/rFU0hxFzvlU1y0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=udfCiMiNqN3mOBziVpjGWImrWMwT+QfsxcHdlSGoNvbXTYPABstOPY4iWl6uLnTgeJ Pkroj6ct6YCOREuLsMr5VWmNgsPfp10tvaU60JZ9CkQ2obNxhd/UudkwUkY1IJuuz0hi 2jA+7QI4+tZ96FEfTk0ac34AxzZNlkSVsEe7w= Received: by 10.204.19.20 with SMTP id y20mr3548766bka.170.1301319769124; Mon, 28 Mar 2011 06:42:49 -0700 (PDT) MIME-Version: 1.0 Sender: jyrki.pulliainen@gmail.com Received: by 10.204.140.77 with HTTP; Mon, 28 Mar 2011 06:42:19 -0700 (PDT) In-Reply-To: References: From: Jyrki Pulliainen Date: Mon, 28 Mar 2011 16:42:19 +0300 X-Google-Sender-Auth: LCOjFVo1na1DG1YEFIdprKUR8iI Message-ID: Subject: Re: Strange bug on long polling changes feed, using OS X To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 28 March 2011 16:36, Matt Goodall wrote: > 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 > . Yeah, the symptoms match on that one. However, I'm not sending limit, but looking at the patch that could affect my problem too. I just have to figure out how to compile CouchDB manually :) - Jyrki