Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
e23b0f67
Commit
e23b0f67
authored
Jun 23, 2004
by
Kurt Zeilenga
Browse files
Move pre/post read calls into outer transaction.
Need to fix retry handling.
parent
ec9d21e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/add.c
View file @
e23b0f67
...
...
@@ -344,23 +344,6 @@ retry: /* transaction retry */
goto
return_results
;;
}
/* post-read */
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
op
->
oq_add
.
rs_e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_add: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_add: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
}
/* nested transaction */
rs
->
sr_err
=
TXN_BEGIN
(
bdb
->
bi_dbenv
,
ltid
,
&
lt2
,
bdb
->
bi_db_opflags
);
...
...
@@ -462,6 +445,25 @@ retry: /* transaction retry */
}
}
/* post-read */
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
op
->
oq_add
.
rs_e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_add: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_add: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_postread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
if
(
op
->
o_noop
)
{
if
((
rs
->
sr_err
=
TXN_ABORT
(
ltid
))
!=
0
)
{
rs
->
sr_text
=
"txn_abort (no-op) failed"
;
...
...
servers/slapd/back-bdb/delete.c
View file @
e23b0f67
...
...
@@ -359,6 +359,8 @@ retry: /* transaction retry */
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_preread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
/* nested transaction */
...
...
servers/slapd/back-bdb/modify.c
View file @
e23b0f67
...
...
@@ -597,24 +597,6 @@ retry: /* transaction retry */
goto
return_results
;
}
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_modify: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_modify: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_postread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
/* change the entry itself */
rs
->
sr_err
=
bdb_id2entry_update
(
op
->
o_bd
,
lt2
,
&
dummy
);
if
(
rs
->
sr_err
!=
0
)
{
...
...
@@ -652,6 +634,24 @@ retry: /* transaction retry */
}
}
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_modify: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_modify: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_postread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
if
(
op
->
o_noop
)
{
if
(
(
rs
->
sr_err
=
TXN_ABORT
(
ltid
)
)
!=
0
)
{
rs
->
sr_text
=
"txn_abort (no-op) failed"
;
...
...
servers/slapd/back-bdb/modrdn.c
View file @
e23b0f67
...
...
@@ -803,6 +803,7 @@ retry: /* transaction retry */
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_preread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
/* nested transaction */
...
...
@@ -919,24 +920,6 @@ retry: /* transaction retry */
goto
return_results
;
}
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_modrdn: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_modrdn: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_postread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
/* id2entry index */
rs
->
sr_err
=
bdb_id2entry_update
(
op
->
o_bd
,
lt2
,
e
);
if
(
rs
->
sr_err
!=
0
)
{
...
...
@@ -1008,6 +991,24 @@ retry: /* transaction retry */
}
}
if
(
op
->
o_postread
)
{
if
(
slap_read_controls
(
op
,
rs
,
e
,
&
slap_post_read_bv
,
&
ctrls
[
num_ctrls
]
)
)
{
#ifdef NEW_LOGGING
LDAP_LOG
(
OPERATION
,
DETAIL1
,
"<=- bdb_modrdn: post-read failed!
\n
"
,
0
,
0
,
0
);
#else
Debug
(
LDAP_DEBUG_TRACE
,
"<=- bdb_modrdn: post-read failed!
\n
"
,
0
,
0
,
0
);
#endif
goto
return_results
;
}
ctrls
[
++
num_ctrls
]
=
NULL
;
op
->
o_postread
=
0
;
/* prevent redo on retry */
/* FIXME: should read entry on the last retry */
}
if
(
op
->
o_noop
)
{
if
((
rs
->
sr_err
=
TXN_ABORT
(
ltid
))
!=
0
)
{
rs
->
sr_text
=
"txn_abort (no-op) failed"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment