Red Hat Bugzilla – Bug 164843
deleting subtyped attribute value problem.
Last modified: 2008-08-11 19:36:35 EDT
Description of problem:
An entry has an attribute (attrA) having the same value (valueA) under the
different subtypes (lang-XX):
If you index attrA, they are indexed under one key "valueA" in the index file
Then, remove one attribute value, e.g., "attrA;lang-ja: valueA",
which deletes the key "valueA" in the index file attrA.db#.
After the key is deleted, search with the filter "(attrA=valueA)" returns none
even if the attribute values still exist in the entry.
Version-Release number of selected component (if applicable):
Found at HP. Could be reproduced on 7.1 on RHEL4.
We should consult with RFCs to figure out the right behavior:
1) Multiple same values are allowed under the same attribute type?
Without subtype, it is NOT allowed. But how about WITH subtypes?
Lu, Grace R C wrote:
> The ldapmodify with replace is broken, how about the original problem
> that the customer reported? In the case of Mail:xyz
> The xyz is removed from mail index database after the mail;lang-ja:xyz
> is removed but the mail:xyz still exists? Is this also a defect?
> I'm not sure if it's really a different defect.
> If it's the case that the two values shouldn't be allowed anyway, then
> the indexing is behaving as designed. I'll need to check the RFCs
> to figure out how duplicate values in subtypes should be handled.
2) If having the same value is allowed:
What is the right behavior?
Deleting one attribute value "attrA;lang-en: valueA" should delete another
"attrA: valueA" in the entry?
Or deleting one attribute value should not delete the key "valueA" in the index
From the customer's point of view, the last is most preferable.
Here is the original report from HP:
"Lu, Grace R C" <firstname.lastname@example.org> wrote:
> We have a customer asking the following:
> They set mail: xyz
> And then mail;lang-ja: xyz,
> Then they remove the mail;lang-ja:xyz.
> The mail index database becomes empty, when there is still an copy of
> xyz value in the database.
> This does not happen for
> And remove one mail:xyz.
> The index database can be rebuilt, however, they don't want to do that
> over and over again in working environment.
> Can the problem be fixed easily?
RFC 3866, section 2.5 states:
A client can provide multiple attributes with the same attribute type
and value, so long as each attribute has a different set of language
This means that the following is allowed:
RFC 3866, section 2.6 states:
Attribute types and language tag options MUST match exactly against
values stored in the directory. For example, if the modification is
a "delete", then if the stored values to be deleted have language tag
options, then those language tag options MUST be provided in the
modify operation, and if the stored values to be deleted do not have
any language tag option, then no language tag option is to be
Basically, a delete of an attribute with a subtype must explicitly call out that
subtype. This means that we need to check if any subtypes with the same value
exist in the entry that you are modifying before removing the key from an index.
Created attachment 117663 [details]
These changes affect the delete and replace operations when being performed
against an indexed attribute. They basically compile a list of values whose
indexes need to be removed, and another list of which index values are to
remain. It putting these lists together, attribute subtypes and multivalued
attributes are taken into account. These lists are then used to modify the
Created attachment 117696 [details]
Checked into ldapserver. Reviewed by Rich (thanks!).
Moved to 7.1 sp 1
Verified fixed against all supported platforms - RHEL3, RHEL4, Solaris 9 32 and
54 bit, HP-UX 11i.
Run indexes test plan.
A client can provide multiple attributes with the same attribute type and value,
only if those attributes are language sub-types
This means that the following is allowed:
If that attribute is indexed, performing a delete which explicitly calls out the
attribute language sub-type to be deleted will not remove the index for the
pasted from release notes:
In Red Hat Directory Server 7.1, indexing of multi-valued attributes with
language subtypes was not handled correctly. This issue has been fixed.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
*** Bug 164590 has been marked as a duplicate of this bug. ***
Verified DS6.21 SP3 candidates 20060222.1 and 20060310.1 on all platforms.
Bug already CLOSED. setting screened+ flag