Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
b2e57148
Commit
b2e57148
authored
Oct 18, 2018
by
Ondřej Kuzník
Browse files
Shorten to one epoch per PDU
A full read cycle can take a very long time if the limits are set too high.
parent
b49f5187
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/connection.c
View file @
b2e57148
...
...
@@ -128,6 +128,11 @@ handle_pdus( void *ctx, void *arg )
}
break
;
}
assert
(
IS_ALIVE
(
c
,
c_refcnt
)
);
epoch_leave
(
epoch
);
epoch
=
epoch_join
();
assert
(
IS_ALIVE
(
c
,
c_refcnt
)
);
}
event_add
(
c
->
c_read_event
,
c
->
c_read_timeout
);
...
...
servers/lloadd/epoch.h
View file @
b2e57148
...
...
@@ -132,6 +132,7 @@ int try_release_ref( uintptr_t *refp, void *object, dispose_cb *cb );
*/
#define RELEASE_REF( object, ref_field, cb ) \
do { \
assert( IS_ALIVE( (object), ref_field ) ); \
if ( !__atomic_sub_fetch( \
&(object)->ref_field, 1, __ATOMIC_ACQ_REL ) ) { \
epoch_append( object, (dispose_cb *)cb ); \
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment