Issue 8227 - syncprov should use more threads
Summary: syncprov should use more threads
Status: VERIFIED WORKSFORME
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: overlays (show other issues)
Version: unspecified
Hardware: All All
: --- enhancement
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-27 14:09 UTC by Howard Chu
Modified: 2022-06-23 16:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Howard Chu 2015-08-27 14:09:11 UTC
Full_Name: Howard Chu
Version: 2.4
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (70.87.222.79)
Submitted by: hyc


Currently a single background thread and output queue is used by syncprov to
send persist messages to all consumers. A single slow consumer can block
messages from being sent to other consumers. syncprov should be enhanced to use
a separate queue and thread per consumer.
Comment 1 OpenLDAP project 2017-04-12 16:50:33 UTC
2.5?
Comment 2 Quanah Gibson-Mount 2017-04-12 16:50:33 UTC
changed notes
moved from Incoming to Software Enhancements
Comment 3 Quanah Gibson-Mount 2021-01-14 18:27:41 UTC
Revisit after beta
Comment 4 Ondřej Kuzník 2022-06-21 09:23:32 UTC
Maybe you meant something else because I'm not seeing this, syncprov_matchops->syncprov_qresp already schedules a separate syncprov_qtask for each active persist session that has anything to send out. Those sessions each have a separate response queue, sharing a reference to the resinfo provided.

And those tasks then run independent of each other sending messages (since ITS#5985 just one message at a time), reclaiming syncres and since ITS#8039 possibly resinfo as they make progress. Also verified all of this at runtime.
Comment 5 Howard Chu 2022-06-21 15:10:54 UTC
Possibly this ticket is obsolete then. If you're satisfied that suspending/blocking one consumer doesn't interfere with other 
consumers' progress, we can just close this.
Comment 6 Ondřej Kuzník 2022-06-21 15:55:43 UTC
Yeah, just gone all the way to backlogging one consumer till we block in slapd_wait_writer() and the other one keeps receiving all messages as they are prepared, just as one would hope. Resuming the blocked consumer seems to flush everything down that connection as well.