Freaky index bug! (was Re: deprecation of MaAsciiStringIndex)

Chris Muller chris at funkyobjects.org
Wed Aug 30 16:53:13 UTC 2006


> I have been battling indexes for a few hours now and I am stumped. I
> have this really marvellously silly result that I just can't
> understand.
> I just recreated it as clean as I could:

Thanks Göran.  You have indeed found a bug.  Magma uses a class called
MaHashIndex to support its indexing.  This class provides a large
Integer mapping, keys to values.

Before multi-attribute query support, the only *values* in the
key-value pairs would only ever be oids.  The value 3 is a special
value reserved in the oid map to indicate an unused entry, it is never
a valid oid for any object.

But now, to support multi-attribute querys, we maintain a "reverse"
index which has the *oids* as keys and index *keys* as values.  So the
low-level code in MaHashIndex which considers any value slot with a 3
in it as an empty slot, that is why we are seeing the silly results
missing 3.  In doing the queries I totally overlooked this special
case!

I'll post a fix soon.  Sorry for this strange problem!

Regards,
  Chris



More information about the Magma mailing list