Bug 578167
Summary: | repl. of mod/replace deletes multi-valued attrs | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Rich Megginson <rmeggins> | ||||
Component: | Replication - General | Assignee: | Rich Megginson <rmeggins> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2.6 | CC: | andrey.ivanov, jgalipea | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-12-07 17:00:46 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 434914, 543590 | ||||||
Attachments: |
|
Description
Rich Megginson
2010-03-30 13:22:18 UTC
There was sort of a similar bug - 515329. Don't know if they could be of the same type/origin. Created attachment 403607 [details]
0001-Bug-578167-repl.-of-mod-replace-deletes-multi-valu.patch
To ssh://git.fedorahosted.org/git/389/ds.git 6e839e9..c559982 master -> master commit c559982cddbe09bad1b7717a84c7b0187111d61a Author: Rich Megginson <rmeggins> Date: Tue Mar 30 16:01:58 2010 -0600 Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: The server implements a mod/replace operation as a mod/delete if all values, followed by a mod/add of the new values. The mod/delete phase, since it removes all of the values, essentially deletes the attribute, so it must set the attribute deletion_csn. This is even true in the case when you do a mod/replace on an attribute that doesn't yet exist. We have to create an empty attribute on the deleted_attrs list with the deletion_csn set to the csn of the operation. This preserves the semantics of the mod/replace operation. When doing the add phase of the mod/replace, we have to be able to resurrect attributes and values that may have been deleted by the mod/delete phase. We can tell that we need to resurrect a deleted value in resolve_attribute_state_multi_valued, in the deleted_values loop, because the deletioncsn will be the same as the update csn, and the delete_priority flag will be 0. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no To ssh://git.fedorahosted.org/git/389/ds.git 6dec072..71b5bb9 Directory_Server_8_2_Branch -> Directory_Server_8_2_Branch commit 71b5bb925a53ecdc23c584eca9fcc4a86093b7cf Author: Rich Megginson <rmeggins> Date: Tue Mar 30 16:01:58 2010 -0600 Branch: Directory_Server_8_2_Branch fix verified RHEL 4 version: redhat-ds-base-8.2.0-2010051904.el4dsrv With Replication stopped: On server 2: changed description to "desc 0" On server 1: changed description to "desc 1" and then to "desc 2" [root@jgalipea-rhel4 578167]# ldapsearch -x -h jgalipea-rhel4.idm.lab.bos.redhat.com -p 1389 -D "cn=Directory Manager" -w Secret123 -b "ou=Accounting,dc=example,dc=com" | grep description description: desc 2 [root@jgalipea-rhel4 578167]# ldapsearch -x -h jgalipea-rhel4.idm.lab.bos.redhat.com -p 2389 -D "cn=Directory Manager" -w Secret123 -b "ou=Accounting,dc=example,dc=com" | grep description description: desc 0 After Replication restarted: [root@jgalipea-rhel4 578167]# ldapsearch -x -h jgalipea-rhel4.idm.lab.bos.redhat.com -p 2389 -D "cn=Directory Manager" -w Secret123 -b "ou=Accounting,dc=example,dc=com" | grep description description: desc 2 [root@jgalipea-rhel4 578167]# ldapsearch -x -h jgalipea-rhel4.idm.lab.bos.redhat.com -p 1389 -D "cn=Directory Manager" -w Secret123 -b "ou=Accounting,dc=example,dc=com" | grep description description: desc 2 |