Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Tero Tilus <tero@tilus.net>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for yields messages in cronological order
Date: Fri, 01 Jan 2010 15:19:45 +0200	[thread overview]
Message-ID: <1262345828-sup-6789@tilus.net> (raw)
In-Reply-To: <1262287125-sup-5933@masanjin.net>

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


      reply	other threads:[~2010-01-01 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1261485246-sup-4236@tilus.net>
2009-12-27 21:37 ` Rich Lane
2009-12-30  2:41   ` Tero Tilus
2009-12-30 14:10     ` William Morgan
2009-12-30 17:01       ` Rich Lane
2009-12-31 19:41         ` William Morgan
2010-01-01 13:19           ` Tero Tilus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262345828-sup-6789@tilus.net \
    --to=tero@tilus.net \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox