From dev-return-6262-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Sun Sep 06 19:05:03 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 81310 invoked from network); 6 Sep 2009 19:05:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Sep 2009 19:05:03 -0000 Received: (qmail 68221 invoked by uid 500); 6 Sep 2009 19:05:02 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 68168 invoked by uid 500); 6 Sep 2009 19:05:02 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 68158 invoked by uid 99); 6 Sep 2009 19:05:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Sep 2009 19:05:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 06 Sep 2009 19:05:00 +0000 Received: (qmail 81106 invoked by uid 99); 6 Sep 2009 19:04:39 -0000 Received: from localhost.apache.org (HELO [192.168.0.4]) (127.0.0.1) (smtp-auth username kocolosk, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Sep 2009 19:04:39 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1075.2) Subject: Re: svn commit: r811709 - in /couchdb/trunk/src/couchdb: couch_config.erl couch_httpd_auth.erl couch_rep.erl From: Adam Kocoloski In-Reply-To: <20090905203745.A0965238890B@eris.apache.org> Date: Sun, 6 Sep 2009 15:04:37 -0400 Content-Transfer-Encoding: 7bit Message-Id: References: <20090905203745.A0965238890B@eris.apache.org> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1075.2) X-Virus-Checked: Checked by ClamAV on apache.org On Sep 5, 2009, at 4:37 PM, jan@apache.org wrote: > -compare_rep_history(S, T) when length(S) =:= 0 orelse length(T) =:= > 0 -> > +compare_rep_history([], []) -> Hi Jan, this patch isn't quite right and can crash the replicator. The old version checked if _either_ list was empty and aborted the comparison; the new version requires that _both_ are empty. If the histories have different lengths we'll get a badmatch in the next clause > compare_rep_history([{S}|SourceRest], [{T}|TargetRest]=Target) -> I think what you wanted was > compare_rep_history(S, T) when S =:= [] orelse T =:= [] -> Best, Adam