[prev in list] [next in list] [prev in thread] [next in thread]
List: fedora-directory-commits
Subject: =?utf-8?q?=5B389-commits=5D?= [389-ds-base] branch 389-ds-base-1.3.8 updated: Ticket 49967 - entry c
From: git () pagure ! io (git repository hosting)
Date: 2018-10-29 18:21:39
Message-ID: 20181029182139.24027.96048 () pagure01 ! fedoraproject ! org
[Download RAW message or body]
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.8
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.8 by this push:
new 0a2cc3b Ticket 49967 - entry cache corruption after failed MODRDN
0a2cc3b is described below
commit 0a2cc3bdb266dc9e88900b1851f119157cae2df6
Author: Thierry Bordaz <tbordaz@redhat.com>
AuthorDate: Wed Oct 24 15:31:25 2018 +0200
Ticket 49967 - entry cache corruption after failed MODRDN
Bug Description:
During a MODRDN the DN cache is updated to replace
source DN with the target DN (modrdn_rename_entry_update_indexes)
If later a failure occurs (for example if BETXN_POSTOP fails) and
the txn is aborted, the target DN (for the specific entryID) remains
in the DN cache.
If the entry is returned in a search, to build the DN there is
a lookup of the DN cache with the entryID. It retrieves the target DN
rather than the source DN
Fix Description:
In case of failure of the operation, the entry (from the entryID)
need to be cleared from the DN cache
https://pagure.io/389-ds-base/issue/49967
Reviewed by: Mark Reynolds
Platforms tested: F27
Flag Day: no
Doc impact: no
(cherry picked from commit ab4af68ef49fcdc5f2f6d0c1f5c7b9a5333b1bee)
---
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c \
b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c index b9a092c..684b040 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
@@ -1400,6 +1400,19 @@ common_return:
}
}
}
+
+ if (ec && retval) {
+ /* if the operation failed, the destination entry does not exist
+ * but it has been added in dncache during cache_add_tentative
+ * we need to remove it. Else a retrieval from ep_id can give the wrong \
DN + */
+ struct backdn *bdn = dncache_find_id(&inst->inst_dncache, ec->ep_id);
+ slapi_log_err(SLAPI_LOG_CACHE, "ldbm_back_modrdn",
+ "operation failed, the target entry is cleared \
from dncache (%s)\n", slapi_entry_get_dn(ec->ep_entry)); + \
CACHE_REMOVE(&inst->inst_dncache, bdn); + \
CACHE_RETURN(&inst->inst_dncache, &bdn); + }
+
/* remove the new entry from the cache if the op failed -
otherwise, leave it in */
if (ec && inst) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic