On Wed, Feb 10, 2010 at 09:30:32AM +0100, Gianluca Montecchi wrote:
> On Tue, Feb 09, 2010 at 08:29:51PM -0500, W. Trevor King wrote:
> > On Sun, Feb 07, 2010 at 11:53:02AM +0000, Eric Y. Kow wrote:
> > > This is really not a handy URL for use in mailing lists and what not:
> > >   
> > > http://code.haskell.org/darcs/darcs-benchmark/reports/bugs/3eb55dab-4072-40d5-84ec-3d6c6a586433.html
> > 
> > Agreed.
> > 
> > > Something like
> > >   http://code.haskell.org/darcs/darcs-benchmark/reports/bugs/3eb.html
> > 
> > This is not a permanent link, as eventual bug additions will push the
> > truncated UUID to >3 chars.
> 
> I don't understand this one.  Why a bug addition must push a
> truncated UUID to >3 char ?  The file name is the full bug id, so i
> think that basically I just need to create the filename using just
> the first 6 char (just to be sure) of bug id.

The filename is currently the full bug ID:
  3eb55dab-4072-40d5-84ec-3d6c6a586433
"3eb" is an abbreviation (minimum 3 characters) that still uniquely
identifies a bug in the bugdir.  As you add more bugs, there is some
chance that one of the new ones shares the first three ID chars "3eb",
which will force both abbreviation up to "3eb5".  For example, the BE
directory has "0ca2..." and "0cad..."

Pushing up to 6 characters would postpone the problem significantly,
but not make it go away.  16^6 ~= 17 million, so you'd have reasonable
collision chances by the time you got up to a million bugs.  Not that
BE could currently handle that many bugs, but launchpad (which numbers
sequentially) is currently up to 519777, and debian (also sequential)
is up to 568913.

At any rate, hardcoding in a given truncation level seems like a bad
idea.  Perhaps we could default to .htaccess+mod_rewrite, but add an
option for truncating the full ids.  Then individual projects can
truncate to whatever level they feel is appropriate.

> > What you want are 301 redirections from the truncated IDs to the full IDs,
> > but that is difficult (impossible?) to do in a server-agnostic way.
> > 
> > The shorter URLs aren't critical, so I'm leaning towards
> > Apache-centrism on this one ;).
> 
> I am not sure that using some hack on the server side is a good idea, since 
> you should take care of too much variables.

Mod-rewrite isn't a hack ;).  This is what it's for.

-- 
This email may be signed or encrypted with GPG (http://www.gnupg.org).
The GPG signature (if present) will be attached as 'signature.asc'.
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt

Attachment: pgpjCTNeVLJsH.pgp
Description: PGP signature

_______________________________________________
Be-devel mailing list
[email protected]
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Reply via email to