From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.87.14 with SMTP id k14cs1355360agb; Fri, 1 Jan 2010 05:20:41 -0800 (PST) Received: by 10.224.31.6 with SMTP id w6mr6637307qac.34.1262352041113; Fri, 01 Jan 2010 05:20:41 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 8si22753750qyk.90.2010.01.01.05.20.40; Fri, 01 Jan 2010 05:20:41 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 251CE15B802F; Fri, 1 Jan 2010 08:20:35 -0500 (EST) Received: from kuovi.tilus.net (kuovi.tilus.net [80.68.89.168]) by rubyforge.org (Postfix) with ESMTP id B03E0185828D for ; Fri, 1 Jan 2010 08:19:47 -0500 (EST) Received: by kuovi.tilus.net (Postfix, from userid 1000) id 5DE8B6011; Fri, 1 Jan 2010 15:19:46 +0200 (EET) From: Tero Tilus To: sup-devel In-reply-to: <1262287125-sup-5933@masanjin.net> References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net> <1262136474-sup-312@tilus.net> <1262182085-sup-1405@masanjin.net> <1262190807-sup-434@zyrg.net> <1262287125-sup-5933@masanjin.net> Date: Fri, 01 Jan 2010 15:19:45 +0200 Message-Id: <1262345828-sup-6789@tilus.net> User-Agent: Sup/git Subject: Re: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for yields messages in cronological order X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org William Morgan, 2009-12-31 21:41: > Out of curiousity, Tero, could the problem also be solved by giving > the in-reply-to header precedence over the references header? Well, yes and no. ;) I think what it needs is to do is a) consider only the first message in In-reply-to: (like it already does), b) prioritize In-reply-to: ahead of References: (like it already does!) and c) if In-reply-to: would create a loop or diamond, resolve by dropping another link ("topmost" conflicting?) and keep the one from In-reply-to: (currently it drops the link suggested by In-reply-to: over another potentially coming from (messed up) References:). Lemme speculate on this a bit. Current threading implementation tries to give In-reply-to: precedence over References: but it still could leave the (in my previous mail described way) malformed References: affecting the real root of the thread. By the time we encounter the In-reply-to: headers which would need to take precedence over the References:, there could already be bogus parent to the root. Say we have First (no In-reply-to: or References:) +- Second (In-reply-to: First; References: First) +- Third (In-reply-to: Second, First; no References:) +- Fourth (In-reply-to: Third; References: Second, First, Third) If Third is a reply to both Second and First (in that order). Then Fourth might have References: Second, First, Third. If, when threading, Fourth is the first processed message then First is seen as a reply to Second. Now when itself Second is processed, the In-reply-to: in it would create a loop and is discarded, (see ThreadSet#link). Resulting in Second +- First +- Third +- Fourth which is exactly what the example headers I posted seem to produce (real root jumps in the middle of one of the branches). -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel