Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 47490 invoked from network); 25 Oct 2010 03:41:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Oct 2010 03:41:05 -0000 Received: (qmail 20628 invoked by uid 500); 25 Oct 2010 03:41:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20403 invoked by uid 500); 25 Oct 2010 03:41:03 -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 20395 invoked by uid 99); 25 Oct 2010 03:41:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 03:41:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bchesneau@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-iw0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 03:40:54 +0000 Received: by iwn37 with SMTP id 37so4397960iwn.11 for ; Sun, 24 Oct 2010 20:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Y5T/F3LWTHZkyHwjjn2PxO+hpZ0A11R8VovVZhaaBnE=; b=LldRpo/Y0EqP52/N5O3NfJ2LYM7KLieM08Iz1ehEL4QGu26UENO0KFX2pnEEU/C65+ ZxKnrHL8g9ASvTMNdLqw2fw1qoMKDuMxU6d+yWhUy2g4WcGKIohyLQrWd9zlK3ZRM6Gh eJu8jESMjLiit+TS/r6xJ/VaX7En5JGjz1Tmc= 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:content-transfer-encoding; b=NjQIHrELU/DSTmfzmGGhbUNzm+ddwhlq6DRptFCGBxyqGXkiibIBYjdyT3hDZgvsNf KmTPvSRpabYPJuVxpT8/3hNG6vMQIRZpYPerm0H+Npnhk6WXPbJUJS42GmLJ2jeQyc5v 3LvIQRb9kbJHG5dW8R3YhBpNlWHRUhis1xrHo= MIME-Version: 1.0 Received: by 10.231.14.8 with SMTP id e8mr5257438iba.16.1287978033826; Sun, 24 Oct 2010 20:40:33 -0700 (PDT) Received: by 10.231.252.89 with HTTP; Sun, 24 Oct 2010 20:40:33 -0700 (PDT) In-Reply-To: References: Date: Mon, 25 Oct 2010 05:40:33 +0200 Message-ID: Subject: Re: altering 'doc' variable in map function affects other map functions From: Benoit Chesneau To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Oct 25, 2010 at 2:52 AM, Adam Kocoloski wrote= : > On Oct 24, 2010, at 4:42 PM, afters wrote: > >> Hello couchers, >> >> I have the following two map functions (v1.0.1): >> >> function (doc) { >> =A0 emit(doc.path[0], null); >> } >> >> function (doc) { >> =A0doc.path =3D [ 'an intruder from another view' ]; >> } >> >> When the views are built, the first map function sees a 'doc' variable t= hat >> was changed by the second map function! and thus emits the key 'an intru= der >> from another view'. >> >> The real documents remain untouched. >> >> Besides being a great way for map functions to communicate with each oth= er, >> I assume it's also a bug? >> >> >> a. > > Well, yes. =A0At one point map functions in a single view group were supp= osed to be protected from one another, but that's been broken for a long ti= me, and I'm not sure about an ETA for restoring it. > > Adam > > Hum, That's a serious bug imo (didn't saw it on my stuff) and thought it was fixed . Any idea when it was introduced ? - beno=EEt