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
Nadezhda Ivanova
OpenLDAP
Commits
f1e7ffb1
Commit
f1e7ffb1
authored
25 years ago
by
Kurt Spanier
Browse files
Options
Downloads
Patches
Plain Diff
Delayed backend lock release to replog entry after successful add().
parent
3041aafc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
servers/slapd/back-bdb2/add.c
+18
-7
18 additions, 7 deletions
servers/slapd/back-bdb2/add.c
servers/slapd/back-bdb2/entry.c
+1
-2
1 addition, 2 deletions
servers/slapd/back-bdb2/entry.c
servers/slapd/back-bdb2/proto-back-bdb2.h
+5
-0
5 additions, 0 deletions
servers/slapd/back-bdb2/proto-back-bdb2.h
with
24 additions
and
9 deletions
servers/slapd/back-bdb2/add.c
+
18
−
7
View file @
f1e7ffb1
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
#include
"back-bdb2.h"
#include
"back-bdb2.h"
#include
"proto-back-bdb2.h"
#include
"proto-back-bdb2.h"
static
DB_LOCK
lock
;
static
int
static
int
bdb2i_back_add_internal
(
bdb2i_back_add_internal
(
BackendDB
*
be
,
BackendDB
*
be
,
...
@@ -217,7 +220,7 @@ return_results:;
...
@@ -217,7 +220,7 @@ return_results:;
bdb2i_cache_return_entry_w
(
&
li
->
li_cache
,
p
);
bdb2i_cache_return_entry_w
(
&
li
->
li_cache
,
p
);
}
}
if
(
1
||
rc
)
{
if
(
rc
)
{
/* free entry and writer lock */
/* free entry and writer lock */
bdb2i_cache_return_entry_w
(
&
li
->
li_cache
,
e
);
bdb2i_cache_return_entry_w
(
&
li
->
li_cache
,
e
);
}
}
...
@@ -234,9 +237,8 @@ bdb2_back_add(
...
@@ -234,9 +237,8 @@ bdb2_back_add(
Entry
*
e
Entry
*
e
)
)
{
{
DB_LOCK
lock
;
struct
ldbminfo
*
li
=
(
struct
ldbminfo
*
)
be
->
be_private
;
struct
ldbminfo
*
li
=
(
struct
ldbminfo
*
)
be
->
be_private
;
struct
timeval
time1
,
time2
;
struct
timeval
time1
;
int
ret
;
int
ret
;
bdb2i_start_timing
(
be
->
bd_info
,
&
time1
);
bdb2i_start_timing
(
be
->
bd_info
,
&
time1
);
...
@@ -248,8 +250,6 @@ bdb2_back_add(
...
@@ -248,8 +250,6 @@ bdb2_back_add(
}
}
bdb2i_start_timing
(
be
->
bd_info
,
&
time2
);
/* check, if a new default attribute index will be created,
/* check, if a new default attribute index will be created,
in which case we have to open the index file BEFORE TP */
in which case we have to open the index file BEFORE TP */
switch
(
slapMode
)
{
switch
(
slapMode
)
{
...
@@ -262,11 +262,22 @@ bdb2_back_add(
...
@@ -262,11 +262,22 @@ bdb2_back_add(
}
}
ret
=
bdb2i_back_add_internal
(
be
,
conn
,
op
,
e
);
ret
=
bdb2i_back_add_internal
(
be
,
conn
,
op
,
e
);
bdb2i_stop_timing
(
be
->
bd_info
,
time2
,
"ADD-INTERN"
,
conn
,
op
);
(
void
)
bdb2i_leave_backend_w
(
lock
);
/* if the operation was successful, we will delay the unlock */
if
(
ret
)
(
void
)
bdb2i_leave_backend_w
(
lock
);
bdb2i_stop_timing
(
be
->
bd_info
,
time1
,
"ADD"
,
conn
,
op
);
bdb2i_stop_timing
(
be
->
bd_info
,
time1
,
"ADD"
,
conn
,
op
);
return
(
ret
);
return
(
ret
);
}
}
int
bdb2i_release_add_lock
(
void
)
{
(
void
)
bdb2i_leave_backend_w
(
lock
);
return
0
;
}
This diff is collapsed.
Click to expand it.
servers/slapd/back-bdb2/entry.c
+
1
−
2
View file @
f1e7ffb1
...
@@ -19,12 +19,11 @@ bdb2_back_entry_release_rw(
...
@@ -19,12 +19,11 @@ bdb2_back_entry_release_rw(
int
rw
int
rw
)
)
{
{
#if 0
struct
ldbminfo
*
li
=
(
struct
ldbminfo
*
)
be
->
be_private
;
struct
ldbminfo
*
li
=
(
struct
ldbminfo
*
)
be
->
be_private
;
/* free entry and reader or writer lock */
/* free entry and reader or writer lock */
bdb2i_cache_return_entry_rw
(
&
li
->
li_cache
,
e
,
rw
);
bdb2i_cache_return_entry_rw
(
&
li
->
li_cache
,
e
,
rw
);
#endif
bdb2i_release_add_lock
();
return
0
;
return
0
;
}
}
This diff is collapsed.
Click to expand it.
servers/slapd/back-bdb2/proto-back-bdb2.h
+
5
−
0
View file @
f1e7ffb1
...
@@ -9,6 +9,11 @@
...
@@ -9,6 +9,11 @@
LDAP_BEGIN_DECL
LDAP_BEGIN_DECL
/*
* add.c
*/
int
bdb2i_release_add_lock
LDAP_P
(());
/*
/*
* alias.c
* alias.c
*/
*/
...
...
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