Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joe Martin
OpenLDAP
Commits
51330ebd
Commit
51330ebd
authored
17 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#5221
Fix dn2id cache for back-hdb rename ops
parent
40936c6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+1
-0
1 addition, 0 deletions
CHANGES
servers/slapd/back-bdb/cache.c
+31
-21
31 additions, 21 deletions
servers/slapd/back-bdb/cache.c
with
32 additions
and
21 deletions
CHANGES
+
1
−
0
View file @
51330ebd
...
...
@@ -13,6 +13,7 @@ OpenLDAP 2.4.7 Engineering
Fixed slapd 3-way Multi-Master Replication (ITS#5238)
Fixed slapd hash collisions in index slots (ITS#5183)
Fixed slapd-bdb to report and fail on internal errors (ITS#5232)
Fixed slapd-hdb caching on rename ops (ITS#5221)
Fixed slapo-pcache op->o_abandon handling (ITS#5187)
Fixed slapo-ppolicy single password check on modify (ITS#5146)
Fixed slapo-ppolicy internal search (ITS#5235)
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-bdb/cache.c
+
31
−
21
View file @
51330ebd
...
...
@@ -1148,9 +1148,6 @@ bdb_cache_modrdn(
free
(
ei
->
bei_nrdn
.
bv_val
);
ber_dupbv
(
&
ei
->
bei_nrdn
,
nrdn
);
if
(
!
pei
->
bei_kids
)
pei
->
bei_state
|=
CACHE_ENTRY_NO_KIDS
|
CACHE_ENTRY_NO_GRANDKIDS
;
#ifdef BDB_HIER
free
(
ei
->
bei_rdn
.
bv_val
);
...
...
@@ -1161,8 +1158,16 @@ bdb_cache_modrdn(
rdn
.
bv_len
=
ptr
-
rdn
.
bv_val
;
}
ber_dupbv
(
&
ei
->
bei_rdn
,
&
rdn
);
pei
->
bei_ckids
--
;
if
(
pei
->
bei_dkids
)
pei
->
bei_dkids
--
;
/* If new parent, decrement kid counts */
if
(
ein
)
{
pei
->
bei_ckids
--
;
if
(
pei
->
bei_dkids
)
{
pei
->
bei_dkids
--
;
if
(
pei
->
bei_dkids
<
2
)
pei
->
bei_state
|=
CACHE_ENTRY_NO_KIDS
|
CACHE_ENTRY_NO_GRANDKIDS
;
}
}
#endif
if
(
!
ein
)
{
...
...
@@ -1171,27 +1176,32 @@ bdb_cache_modrdn(
ei
->
bei_parent
=
ein
;
bdb_cache_entryinfo_unlock
(
pei
);
bdb_cache_entryinfo_lock
(
ein
);
}
/* parent now has kids */
if
(
ein
->
bei_state
&
CACHE_ENTRY_NO_KIDS
)
ein
->
bei_state
^=
CACHE_ENTRY_NO_KIDS
;
/* new parent now has kids */
if
(
ein
->
bei_state
&
CACHE_ENTRY_NO_KIDS
)
ein
->
bei_state
^=
CACHE_ENTRY_NO_KIDS
;
/* grandparent has grandkids */
if
(
ein
->
bei_parent
)
ein
->
bei_parent
->
bei_state
&=
~
CACHE_ENTRY_NO_GRANDKIDS
;
#ifdef BDB_HIER
/* parent might now have grandkids */
if
(
ein
->
bei_state
&
CACHE_ENTRY_NO_GRANDKIDS
&&
!
(
ei
->
bei_state
&
(
CACHE_ENTRY_NO_KIDS
))
)
ein
->
bei_state
^=
CACHE_ENTRY_NO_GRANDKIDS
;
/* parent might now have grandkids */
if
(
ein
->
bei_state
&
CACHE_ENTRY_NO_GRANDKIDS
&&
!
(
ei
->
bei_state
&
CACHE_ENTRY_NO_KIDS
))
ein
->
bei_state
^=
CACHE_ENTRY_NO_GRANDKIDS
;
{
/* Record the generation number of this change */
ldap_pvt_thread_mutex_lock
(
&
bdb
->
bi_modrdns_mutex
);
bdb
->
bi_modrdns
++
;
ei
->
bei_modrdns
=
bdb
->
bi_modrdns
;
ldap_pvt_thread_mutex_unlock
(
&
bdb
->
bi_modrdns_mutex
);
ein
->
bei_ckids
++
;
if
(
ein
->
bei_dkids
)
ein
->
bei_dkids
++
;
#endif
}
ein
->
bei_ckids
++
;
if
(
ein
->
bei_dkids
)
ein
->
bei_dkids
++
;
#ifdef BDB_HIER
/* Record the generation number of this change */
ldap_pvt_thread_mutex_lock
(
&
bdb
->
bi_modrdns_mutex
);
bdb
->
bi_modrdns
++
;
ei
->
bei_modrdns
=
bdb
->
bi_modrdns
;
ldap_pvt_thread_mutex_unlock
(
&
bdb
->
bi_modrdns_mutex
);
#endif
avl_insert
(
&
ein
->
bei_kids
,
ei
,
bdb_rdn_cmp
,
avl_dup_error
);
bdb_cache_entryinfo_unlock
(
ein
);
return
rc
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment