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
3e5490f4
Commit
3e5490f4
authored
Apr 15, 2020
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Jun 22, 2020
Browse files
ITS#9043 More descriptive logs for syncrepl traffic and decisions
parent
8006ee58
Pipeline
#489
passed with stage
in 25 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/syncprov.c
View file @
3e5490f4
...
@@ -1317,15 +1317,17 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
...
@@ -1317,15 +1317,17 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
/* Don't send ops back to the originator */
/* Don't send ops back to the originator */
if
(
opc
->
osid
>
0
&&
opc
->
osid
==
ss
->
s_sid
)
{
if
(
opc
->
osid
>
0
&&
opc
->
osid
==
ss
->
s_sid
)
{
Debug
(
LDAP_DEBUG_SYNC
,
"syncprov_matchops: skipping original sid %03x
\n
"
,
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_matchops: "
opc
->
osid
);
"skipping original sid %03x
\n
"
,
ss
->
s_op
->
o_log_prefix
,
opc
->
osid
);
continue
;
continue
;
}
}
/* Don't send ops back to the messenger */
/* Don't send ops back to the messenger */
if
(
opc
->
rsid
>
0
&&
opc
->
rsid
==
ss
->
s_sid
)
{
if
(
opc
->
rsid
>
0
&&
opc
->
rsid
==
ss
->
s_sid
)
{
Debug
(
LDAP_DEBUG_SYNC
,
"syncprov_matchops: skipping relayed sid %03x
\n
"
,
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_matchops: "
opc
->
rsid
);
"skipping relayed sid %03x
\n
"
,
ss
->
s_op
->
o_log_prefix
,
opc
->
rsid
);
continue
;
continue
;
}
}
...
@@ -1389,8 +1391,9 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
...
@@ -1389,8 +1391,9 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
ldap_pvt_thread_mutex_unlock
(
&
ss
->
s_mutex
);
ldap_pvt_thread_mutex_unlock
(
&
ss
->
s_mutex
);
}
}
Debug
(
LDAP_DEBUG_TRACE
,
"syncprov_matchops: sid %03x fscope %d rc %d
\n
"
,
Debug
(
LDAP_DEBUG_TRACE
,
"%s syncprov_matchops: "
ss
->
s_sid
,
fc
.
fscope
,
rc
);
"sid %03x fscope %d rc %d
\n
"
,
ss
->
s_op
->
o_log_prefix
,
ss
->
s_sid
,
fc
.
fscope
,
rc
);
/* check if current o_req_dn is in scope and matches filter */
/* check if current o_req_dn is in scope and matches filter */
if
(
fc
.
fscope
&&
rc
==
LDAP_COMPARE_TRUE
)
{
if
(
fc
.
fscope
&&
rc
==
LDAP_COMPARE_TRUE
)
{
...
@@ -1745,8 +1748,9 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
...
@@ -1745,8 +1748,9 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
* and everything else at the end. Do this first so we can
* and everything else at the end. Do this first so we can
* unlock the list mutex.
* unlock the list mutex.
*/
*/
Debug
(
LDAP_DEBUG_SYNC
,
"srs csn %s
\n
"
,
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_play_sessionlog: "
srs
->
sr_state
.
ctxcsn
[
0
].
bv_val
);
"sync control csn %s
\n
"
,
op
->
o_log_prefix
,
srs
->
sr_state
.
ctxcsn
[
0
].
bv_val
);
for
(
se
=
sl
->
sl_head
;
se
;
se
=
se
->
se_next
)
{
for
(
se
=
sl
->
sl_head
;
se
;
se
=
se
->
se_next
)
{
int
k
;
int
k
;
...
@@ -1767,7 +1771,8 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
...
@@ -1767,7 +1771,8 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
}
}
if
(
ndel
<=
0
)
{
if
(
ndel
<=
0
)
{
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_playlog: "
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_playlog: "
"cmp %d, too old
\n
"
,
op
->
o_log_prefix
,
ndel
);
"cmp %d, csn %s too old, skipping
\n
"
,
op
->
o_log_prefix
,
ndel
,
se
->
se_csn
.
bv_val
);
continue
;
continue
;
}
}
ndel
=
0
;
ndel
=
0
;
...
@@ -1779,7 +1784,8 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
...
@@ -1779,7 +1784,8 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl,
}
}
if
(
ndel
>
0
)
{
if
(
ndel
>
0
)
{
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_playlog: "
Debug
(
LDAP_DEBUG_SYNC
,
"%s syncprov_playlog: "
"cmp %d, too new
\n
"
,
op
->
o_log_prefix
,
ndel
);
"cmp %d, csn %s too new, we're finished
\n
"
,
op
->
o_log_prefix
,
ndel
,
se
->
se_csn
.
bv_val
);
break
;
break
;
}
}
if
(
se
->
se_tag
==
LDAP_REQ_DELETE
)
{
if
(
se
->
se_tag
==
LDAP_REQ_DELETE
)
{
...
...
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