Re: [389-devel] Please review (revised): [Bug 506786] Index maintenance mechanism causes wrong search results when modifying attributes with subtypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Noriko Hosoi wrote:
Summary: Index maintenance mechanism causes wrong search results when modifying attributes with subtypes

https://bugzilla.redhat.com/show_bug.cgi?id=506786

There was a not-working case found in my previous proposal.

The problem is if these attribute value pairs exist in an entry:
  mail: abc
  mail;en: abc
  mail;fr: xyz
removing mail=abc or mail;en=abc, should not remove =abc from the mail.db#. My previous fix worked only when removing "mail;en=abc", but not when removing "mail=abc".

[Problem Description]

When adding a value to an attribute with subtype indexed on equality and then deleting this attribute subtype the index is not maintained correctly which
results in wrong search results afterwards. After stopping the server and
reindexing with db2index everything works correctly again. The unindexed and
substring searches do not seem to be concerned.

[Fix Description]
When there are identical attribute value pairs except subtypes exist
in an entry, if one of the pairs are deleted, it should not affect the
index the attribute value is the key.

e.g.,
 mail: abc
 mail;en: abc
 mail;fr: xyz

 removing mail=abc or mail;en=abc, should not remove =abc from the
 mail.db#.

This fix uses the value array evals to determine if the equality key
in the index should be deleted or not.  The value array evals stores
the values of the attribute in the entry after the deletion is done.
If evals is empty, it means the to-be-deleted attribute value pair is
the only pair in the entry.  Thus, the equality key can be removed fom
the index.

If evals has values, then the to-be-deleted attribute (curr_attr,
which was retrieved from the old entry) value needs to be checked if
it's in evals or not.  If it is in evals, the equality key is still
used by other pair(s).  So, leave it.  Otherwise, the key can be
removed.

In the above example, let's assume removing mail=abc.  evals holds
{"abc", "xyz"}.  curr_attr abc is in evals, thus =abc will not be
removed.
ack

------------------------------------------------------------------------

--
389-devel mailing list
389-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
389-devel mailing list
389-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux